GroupClause
Extends

Description

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

Methods

groupBy( conditionsFn: (builder: PatternBuilder) => string | number | boolean | Date | Expression<ConditionalOrExpressionToken> | Projectable<ProjectableToken> | (string | number | boolean | Date | Expression<...> | Projectable<...>)[] ): HavingClause<T> & T

Set the conditions to divide the solutions returned by the query into one or more groups.

Parameters

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

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

Returns

Object with the methods to keep constructing the query.

GroupClause

Description

Constant with the utils for GroupClause objects.

Methods

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

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

Parameters

NameTypeDescription
Factory<C, T>

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

C

The related container with the data for the GroupClause statement.

O

The base base from where to create the GroupClause statement.

Returns

The GroupClause statement created from the object provided.