Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OrderBy

Used by Query classes that can be ordered, like Select and Count.

Hierarchy

  • OrderBy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected escaper

escaper: Escaper

An Escaper matching the database type (e.g. MySQLEscaper or MSSQLEscaper). Used when escaping column names in compiled conditions.

Protected from

from: From

A From instance which holds the base table, all joined-in tables, and the where clause.

Protected order

order: OrderByType[] = []

Methods

getOrderByString

  • getOrderByString(): string
  • Get the ORDER BY portion of the query string, or an empty string if there is no order.

    Returns string

isOrdered

  • isOrdered(): boolean

orderBy

  • Order by one or more columns.

    Parameters

    • Rest ...orders: OrderByType[] | string[]

      A list of fully-qualified properties in the form <table-alias>.<property>, or an array of OrderByType with the fully-qualified property and direction.

    Returns this

Generated using TypeDoc