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.
Field#asc(), Field#desc()
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull Field | |
| public <U> @NotNull SortField | |
| public @Nullable QOM. | |
| public @NotNull SortField | $nullOrdering(QOM.
Experimental query object model mutator method, see also |
| public @NotNull SortOrder | |
| public @NotNull SortField | |
| public @NotNull String | |
| public @NotNull SortOrder | |
| public @NotNull SortField | |
| public @NotNull SortField |
| $field | back to summary |
|---|---|
| public @NotNull Field Deprecated as a consequence of Experimental query object model accessor method, see also
| |
| $field | back to summary |
|---|---|
| public <U> @NotNull SortField Deprecated as a consequence of Experimental query object model mutator method, see also
| |
| $nullOrdering | back to summary |
|---|---|
| public @Nullable QOM. Experimental query object model accessor method, see also
| |
| $nullOrdering | back to summary |
|---|---|
| public @NotNull SortField Experimental query object model mutator method, see also
| |
| $sortOrder | back to summary |
|---|---|
| public @NotNull SortOrder $sortOrder() Experimental query object model accessor method, see also
| |
| $sortOrder | back to summary |
|---|---|
| public @NotNull SortField Experimental query object model mutator method, see also
| |
| getName | back to summary |
|---|---|
| public @NotNull String getName() The name of this sort field
| |
| getOrder | back to summary |
|---|---|
| public @NotNull SortOrder getOrder() Get the underlying sort order of this sort field
| |
| nullsFirst | back to summary |
|---|---|
| public @NotNull SortField Add a | |
| nullsLast | back to summary |
|---|---|
| public @NotNull SortField Add a | |