Skip to content

SelectQueryBuilder.orderBy() method

Home > @direct-sqlite/core > SelectQueryBuilder > orderBy

Restructures response sequences based on designated column indices.

Signature:

orderBy(column: keyof TRow, direction?: 'ASC' | 'DESC'): this;

Parameter

Type

Description

column

keyof TRow

The column name to order the results by. Should be a key of the table’s row type.

direction

‘ASC’ | ‘DESC’

(Optional) The direction to order the results, either ‘ASC’ for ascending or ‘DESC’ for descending. Defaults to ‘ASC’ if not specified.

Returns:

this