IQueryBuilder
age-schema-client / IQueryBuilder
Interface: IQueryBuilder<T>
Defined in: src/query/types.ts:206
Query builder interface
Type Parameters
| Type Parameter |
|---|
T extends SchemaDefinition |
Methods
match()
Call Signature
match<L>(label, alias): IMatchClause<T, L>;
Defined in: src/query/types.ts:210
Add MATCH clause for a vertex
Type Parameters
| Type Parameter |
|---|
L extends string | number | symbol |
Parameters
| Parameter | Type |
|---|---|
label | L |
alias | string |
Returns
IMatchClause<T, L>
Call Signature
match<E>(
sourceAlias,
edgeLabel,
targetAlias): IEdgeMatchClause<T>;
Defined in: src/query/types.ts:220
Add MATCH clause for an edge between two previously matched vertices
Type Parameters
| Type Parameter |
|---|
E extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
sourceAlias | string | Source vertex alias |
edgeLabel | E | Edge label |
targetAlias | string | Target vertex alias |
Returns
Edge match clause
Call Signature
match<E>(
sourceAlias,
edgeLabel,
targetAlias,
edgeAlias): IEdgeMatchClause<T>;
Defined in: src/query/types.ts:235
Add MATCH clause for an edge between two previously matched vertices with an edge alias
Type Parameters
| Type Parameter |
|---|
E extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
sourceAlias | string | Source vertex alias |
edgeLabel | E | Edge label |
targetAlias | string | Target vertex alias |
edgeAlias | string | Edge alias |
Returns
Edge match clause
where()
where(condition, params?): this;
Defined in: src/query/types.ts:245
Add WHERE clause
Parameters
| Parameter | Type |
|---|---|
condition | string |
params? | Record<string, any> |
Returns
this
return()
return(...expressions): this;
Defined in: src/query/types.ts:250
Add RETURN clause
Parameters
| Parameter | Type |
|---|---|
...expressions | string[] |
Returns
this
orderBy()
orderBy(expression, direction?): this;
Defined in: src/query/types.ts:255
Add ORDER BY clause
Parameters
| Parameter | Type |
|---|---|
expression | string |
direction? | OrderDirection |
Returns
this
limit()
limit(count): this;
Defined in: src/query/types.ts:260
Add LIMIT clause
Parameters
| Parameter | Type |
|---|---|
count | number |
Returns
this
skip()
skip(count): this;
Defined in: src/query/types.ts:265
Add SKIP clause
Parameters
| Parameter | Type |
|---|---|
count | number |
Returns
this
with()
with(...expressions): this;
Defined in: src/query/types.ts:270
Add WITH clause
Parameters
| Parameter | Type |
|---|---|
...expressions | string[] |
Returns
this
unwind()
unwind(expression, alias): this;
Defined in: src/query/types.ts:275
Add UNWIND clause
Parameters
| Parameter | Type |
|---|---|
expression | string |
alias | string |
Returns
this
withParam()
withParam(name, value): this;
Defined in: src/query/types.ts:280
Add a parameter to the query
Parameters
| Parameter | Type |
|---|---|
name | string |
value | any |
Returns
this
setParam()
setParam(key, value): Promise<IQueryBuilder<T>>;
Defined in: src/query/types.ts:285
Set a parameter in the age_params temporary table
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
Promise<IQueryBuilder<T>>
withParamFunction()
withParamFunction(functionName, alias): this;
Defined in: src/query/types.ts:290
Add a WITH clause that calls a function to get parameters
Parameters
| Parameter | Type |
|---|---|
functionName | string |
alias | string |
Returns
this
withAgeParam()
withAgeParam(key, alias): this;
Defined in: src/query/types.ts:295
Add a WITH clause that calls the get_age_param function
Parameters
| Parameter | Type |
|---|---|
key | string |
alias | string |
Returns
this
withAllAgeParams()
withAllAgeParams(alias?): this;
Defined in: src/query/types.ts:300
Add a WITH clause that calls the get_all_age_params function
Parameters
| Parameter | Type |
|---|---|
alias? | string |
Returns
this
execute()
execute<R>(options?): QueryBuilderResult<R>;
Defined in: src/query/types.ts:305
Execute the query
Type Parameters
| Type Parameter | Default type |
|---|---|
R | any |
Parameters
| Parameter | Type |
|---|---|
options? | QueryExecutionOptions |
Returns
toCypher()
toCypher(): string;
Defined in: src/query/types.ts:310
Get the Cypher query string
Returns
string
getParameters()
getParameters(): Record<string, any>;
Defined in: src/query/types.ts:315
Get the query parameters
Returns
Record<string, any>