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
Name | Type | Description |
---|---|---|
(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 |
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
Name | Type | Description |
---|---|---|
(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 |
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
Name | Type | Description |
---|---|---|
(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 |
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
Name | Type | Description |
---|---|---|
The list of variables. IF no variable is provided, the behaviour will be the same as | ||
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
Name | Type | Description |
---|---|---|
Factory<Container<QueryToken<SelectToken>>, T> | The factory to create the generic finish of the | |
C | The related container with the data for the | |
O | The base base from where to create the |
Returns
The SelectClause
statement created from the object provided.