OrderClause

Description

Interface with the methods available to make a ORDER BY statement.

Methods

orderBy( conditionsFn: (builder: PatternBuilder) => string | number | boolean | Date | Expression<ConditionalOrExpressionToken> | OrderCondition | (string | number | boolean | Date | Expression<ConditionalOrExpressionToken> | OrderCondition)[] ): LimitOffsetClause<T> & T

Set conditions to be used as the order of the sequence of solutions the query will retrieve.

Parameters

NameTypeDescription
(builder: PatternBuilder) => string | number | boolean | Date | Expression<ConditionalOrExpressionToken> | OrderCondition | (string | number | boolean | Date | Expression<ConditionalOrExpressionToken> | OrderCondition)[]

Function that create the conditions to be applied to the solutions order.

Returns

Object with the methods to keep constructing the query.

OrderClause

Description

Constant with the utils for OrderClause objects.

Methods

createFrom<C extends Container<QueryToken<QueryClauseToken> | SubSelectToken>, T extends FinishClause, O extends object>( genericFactory: Factory<C, T>, container: C, object: O ): O & OrderClause<T>

Factory function that allows to crete a OrderClause from the object provided.

Parameters

NameTypeDescription
Factory<C, T>

The factory to create the generic finish of the OrderClause statement.

C

The related container with the data for the OrderClause statement.

O

The base base from where to create the OrderClause statement.

Returns

The OrderClause statement created from the object provided.