SelectClause

Description

Interface with the methods available to make a SELECT query.

Methods

select( variablesFunction: (builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[] ): FromClause<T>

Set a list of variables, constructed by the builder helper, to be retrieved by the query.

Parameters

NameTypeDescription
(builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[]

Function that retrieves the variables and assignments.. IF no variable is provided, the behaviour will be the same as SelectClause.selectAll

Returns

Object with the methods to keep constructing the query.

selectDistinct( variablesFunction: (builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[] ): FromClause<T>

Set a list of variables, constructed by the builder helper, to be retrieved by the query ensuring no repetitions in the set of solutions.

Parameters

NameTypeDescription
(builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[]

Function that retrieves the variables and assignments.. IF no variable is provided, the behaviour will be the same as SelectClause.selectAllDistinct

Returns

Object with the methods to keep constructing the query.

selectDistinct( variablesFunction: (builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[] ): FromClause<T>

Set a list of variables, constructed by the builder helper, to be retrieved by the query permitting eliminations of non-distinct solutions, but not ensuring a set of unique ones.

Parameters

NameTypeDescription
(builder: PatternBuilder) => string | Projectable<ProjectableToken> | (string | Projectable<ProjectableToken>)[]

Function that retrieves the variables and assignments.. IF no variable is provided, the behaviour will be the same as SelectClause.selectAllReduced

Returns

Object with the methods to keep constructing the query.

selectReduced( ...variables: string[] ): FromClause<T>

Set a list of variables to be retrieved by the query permitting eliminations of non-distinct solutions, but not ensuring a set of unique ones.

Parameters

NameTypeDescription

The list of variables. IF no variable is provided, the behaviour will be the same as SelectClause.selectAllReduced

string[]

Returns

Object with the methods to keep constructing the query.

selectAll(): FromClause<T>

Set that the query must return all the solutions for the variables used in the where pattern matching.

Returns

Object with the methods to keep constructing the query.

selectAllDistinct(): FromClause<T>

Set that the query must return all the solutions for the variables used in the where pattern matching, ensuring there is not duplicated solutions.

Returns

Object with the methods to keep constructing the query.

selectAllReduced(): FromClause<T>

Set that the query must return all the solutions for the variables used in the where pattern matching, permitting eliminations of non-distinct solutions, but not ensuring a set of unique ones.

Returns

Object with the methods to keep constructing the query.

SelectClause

Description

Constant with the utils for SelectClause objects.

Methods

createFrom<C extends Container<QueryToken>, T extends FinishClause, O extends object>( genericFactory: Factory<Container<QueryToken<SelectToken>>, T>, container: C, object: O ): O & SelectClause<T>

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

Parameters

NameTypeDescription
Factory<Container<QueryToken<SelectToken>>, T>

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

C

The related container with the data for the SelectClause statement.

O

The base base from where to create the SelectClause statement.

Returns

The SelectClause statement created from the object provided.