OrderBuilder

Description

Builder that lets you construct an object that sets a specific order in a condition to be used in OrderClause.

Methods

asc( condition: string | number | boolean | Date | Expression<ConditionalOrExpressionToken> ): OrderCondition

Sets the condition to have an ascending order.

Parameters

NameTypeDescription
string | number | boolean | Date | Expression<ConditionalOrExpressionToken>

Condition to be in ascending order.

desc( condition: string | number | boolean | Date | Expression<ConditionalOrExpressionToken> ): OrderCondition

Sets the condition to have an descending order.

Parameters

NameTypeDescription
string | number | boolean | Date | Expression<ConditionalOrExpressionToken>

Condition to be in descending order.

OrderBuilder

Description

Constant with the utils for OrderBuilder objects.

Methods

createFrom<C extends Container<any>, O extends object>( container: C, object: O ): O & OrderBuilder

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

Parameters

NameTypeDescription
C

The related container with the data for the OrderBuilder statement.

O

The base base from where to create the OrderBuilder statement.

Returns

The OrderBuilder statement created from the object provided.