ValuesClause
Description
Interface with the methods to add a VALUES statement.
Methods
values( variable: string, valuesBuilder: (builder: PatternBuilder) => string | number | boolean | Date | Resource | Literal | (string | number | boolean | Date | Resource | Literal)[] ): T
Set the values of a variable to be combined into the results query.
The values are constructed with a function that receives a pattern builder.
Parameters
Name | Type | Description |
---|---|---|
string | Variable to add values. | |
(builder: PatternBuilder) => string | number | boolean | Date | Resource | Literal | (string | number | boolean | Date | Resource | Literal)[] | Functions that returns the values to be added. |
Returns
Object with the methods to keep constructing the query.
values( variables: string[], values: SupportedNativeTypes[] | SupportedNativeTypes[][] ): T
Set the values of multiple variables to be combined into the results query.
Parameters
Name | Type | Description |
---|---|---|
string[] | Variables to add values. | |
SupportedNativeTypes[] | SupportedNativeTypes[][] | The values to be combined. |
Returns
Object with the methods to keep constructing the query.
values( variables: string[], valuesBuilder: (builder: PatternBuilder) => (string | number | boolean | Date | Resource | Literal)[] | (string | number | boolean | Date | Resource | Literal)[][] ): T
Set the values of multiple variables to be combined into the results query.
The values are constructed with a function that receives a pattern builder.
Parameters
Name | Type | Description |
---|---|---|
string[] | Variables to add values. | |
(builder: PatternBuilder) => (string | number | boolean | Date | Resource | Literal)[] | (string | number | boolean | Date | Resource | Literal)[][] | Functions that returns the values to be added. |
Returns
Object with the methods to keep constructing the query.
ValuesClause
Description
Constant with the utils for ValuesClause
objects.
Methods
createFrom<C extends Container<QueryToken | SubSelectToken>, T extends FinishClause, O extends object>( genericFactory: Factory<C, T>, container: C, object: O ): O & ValuesClause<T>
Factory function that allows to crete a ValuesClause
from the object provided.
Parameters
Name | Type | Description |
---|---|---|
Factory<C, 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 ValuesClause
statement created from the object provided.