- Type Parameters:
T
- The field type
- All Superinterfaces:
OrderField<T>
,QueryPart
,Serializable
A sort specification.
The SQL ORDER BY
clause accepts expressions based on
Field
, which may be enhanced by ASC
or DESC
as well as NULLS FIRST
or NULLS LAST
.
Example:
// Assuming import static org.jooq.impl.DSL.*;
using(configuration)
.select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME)
.from(ACTOR)
.orderBy(ACTOR.LAST_UPDATE.desc().nullsLast())
.fetch();
Instances can be created using Field.asc()
, Field.desc()
and
related methods.
- Author:
- Lukas Eder
- See Also:
-
Method Summary
Modifier and TypeMethodDescription$field()
Experimental query object model accessor method, see alsoQOM
.<U> @NotNull SortField
<U> Experimental query object model mutator method, see alsoQOM
.@Nullable QOM.NullOrdering
Experimental query object model accessor method, see alsoQOM
.$nullOrdering
(QOM.NullOrdering newOrdering) Experimental query object model mutator method, see alsoQOM
.@NotNull SortOrder
Experimental query object model accessor method, see alsoQOM
.$sortOrder
(SortOrder newOrder) Experimental query object model mutator method, see alsoQOM
.@NotNull String
getName()
The name of this sort field@NotNull SortOrder
getOrder()
Get the underlying sort order of this sort fieldAdd aNULLS FIRST
clause to this sort fieldAdd aNULLS LAST
clause to this sort field
-
Method Details
-
getName
The name of this sort field -
getOrder
Get the underlying sort order of this sort field -
nullsFirst
Add aNULLS FIRST
clause to this sort field -
nullsLast
Add aNULLS LAST
clause to this sort field -
$field
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
$field
Experimental query object model mutator method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
$sortOrder
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
$sortOrder
Experimental query object model mutator method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
$nullOrdering
Experimental query object model accessor method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk. -
$nullOrdering
Experimental query object model mutator method, see alsoQOM
. Subject to change in future jOOQ versions, use at your own risk.
-