# SortOrder

enum SortOrder : Enum<SortOrder>

Represents the SQL keywords for defining sort order in an `ORDER BY` clause.

## Entries

ASC
Link copied to clipboard
ASC

The SQL keyword `ASC` for sorting records in ascending order.

DESC
Link copied to clipboard
DESC

The SQL keyword `DESC` for sorting records in descending order.

ASC_NULLS_FIRST
Link copied to clipboard
ASC_NULLS_FIRST

The SQL keyword `ASC` for sorting records in ascending order, combined with `NULLS FIRST` to position SQL NULL values at the start.

DESC_NULLS_FIRST
Link copied to clipboard
DESC_NULLS_FIRST

The SQL keyword `DESC` for sorting records in descending order, combined with `NULLS FIRST` to position SQL NULL values at the start preceding non-null records.

ASC_NULLS_LAST
Link copied to clipboard
ASC_NULLS_LAST

The SQL keyword `ASC` for sorting records in ascending order, combined with `NULLS LAST` to position SQL NULL values at the end following non-null records.

DESC_NULLS_LAST
Link copied to clipboard
DESC_NULLS_LAST

The SQL keyword `DESC` for sorting records in descending order, combined with `NULLS LAST` to position SQL NULL values at the end.

## Properties

code
Link copied to clipboard
val code: String
entries
Link copied to clipboard
val entries: EnumEntries<SortOrder>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int

## Functions

valueOf
Link copied to clipboard
fun valueOf(value: String): SortOrder

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
fun values(): Array<SortOrder>

Returns an array containing the constants of this enum type, in the order they're declared.