org.jooq
Interface SimpleSelectOrderByStep<R extends Record>
- Type Parameters:
R
- The record type being returned by this query
- All Superinterfaces:
- Adapter, Attachable, FieldLike, FieldProvider, Query, QueryPart, ResultQuery<R>, Select<R>, Serializable, SimpleSelectFinalStep<R>, SimpleSelectForUpdateStep<R>, SimpleSelectLimitStep<R>, TableLike<R>
- All Known Subinterfaces:
- SimpleSelectConditionStep<R>, SimpleSelectWhereStep<R>
public interface SimpleSelectOrderByStep<R extends Record>
- extends SimpleSelectLimitStep<R>
This type is used for the Select
's DSL API when selecting specific
Record
types.
Example:
create.selectFrom(T_AUTHOR)
.where(TBook.LANGUAGE.equal("DE"))
.and(TBook.PUBLISHED.greaterThan(parseDate('2008-01-01')))
.orderBy(TAuthor.LAST_NAME.asc().nullsFirst())
.limit(2)
.offset(1)
.forUpdate()
.of(TAuthor.FIRST_NAME, TAuthor.LAST_NAME)
.noWait();
Refer to the manual for more details
- Author:
- Lukas Eder
Methods inherited from interface org.jooq.ResultQuery |
bind, bind, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchAny, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArrays, fetchInto, fetchInto, fetchInto, fetchLater, fetchLater, fetchLazy, fetchLazy, fetchMany, fetchMap, fetchMap, fetchMaps, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOneArray, fetchOneMap, fetchResultSet, getRecordType, getResult |
orderBy
SimpleSelectLimitStep<R> orderBy(Field<?>... fields)
- Add an
ORDER BY
clause to the query
orderBy
SimpleSelectLimitStep<R> orderBy(SortField<?>... fields)
- Add an
ORDER BY
clause to the query
orderBy
SimpleSelectLimitStep<R> orderBy(Collection<SortField<?>> fields)
- Add an
ORDER BY
clause to the query
orderBy
SimpleSelectLimitStep<R> orderBy(int... fieldIndexes)
- Add an
ORDER BY
clause to the query
Indexes start at 1
in SQL!
Note, you can use orderBy(Factory.val(1).desc())
or
orderBy(Factory.literal(1).desc())
to apply descending
ordering
Copyright © 2012. All Rights Reserved.