MatchClause
age-schema-client / MatchClause
Class: MatchClause<T, L>
Defined in: src/query/clauses.ts:25
Match clause implementation
Extended by
Type Parameters
| Type Parameter |
|---|
T extends SchemaDefinition |
L extends keyof T["vertices"] |
Implements
IMatchClause<T,L>
Constructors
Constructor
new MatchClause<T, L>(
queryBuilder,
matchPart,
vertexPattern): MatchClause<T, L>;
Defined in: src/query/clauses.ts:36
Create a new match clause
Parameters
| Parameter | Type | Description |
|---|---|---|
queryBuilder | IQueryBuilder<T> | Query builder |
matchPart | MatchPart | Match part |
vertexPattern | VertexPattern | Vertex pattern |
Returns
MatchClause<T, L>
Methods
constraint()
constraint(properties): this;
Defined in: src/query/clauses.ts:49
Add property constraints to the vertex pattern
Parameters
| Parameter | Type | Description |
|---|---|---|
properties | Record<string, any> | Object with property-value pairs |
Returns
this
This match clause
Throws
Error if any property value is null, undefined, or NaN
Implementation of
where()
where(condition, params?): this;
Defined in: src/query/clauses.ts:83
Add WHERE clause
Parameters
| Parameter | Type | Description |
|---|---|---|
condition | string | Condition expression |
params? | Record<string, any> | Parameters |
Returns
this
This match clause
Implementation of
outgoing()
outgoing<E>(
label,
alias,
targetLabel,
targetAlias): this;
Defined in: src/query/clauses.ts:98
Add outgoing edge
Type Parameters
| Type Parameter |
|---|
E extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
label | E | Edge label |
alias | string | Edge alias |
targetLabel | keyof T["vertices"] | Target vertex label |
targetAlias | string | Target vertex alias |
Returns
this
This match clause
Implementation of
incoming()
incoming<E>(
label,
alias,
sourceLabel,
sourceAlias): this;
Defined in: src/query/clauses.ts:148
Add incoming edge
Type Parameters
| Type Parameter |
|---|
E extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
label | E | Edge label |
alias | string | Edge alias |
sourceLabel | keyof T["vertices"] | Source vertex label |
sourceAlias | string | Source vertex alias |
Returns
this
This match clause
Implementation of
related()
related<E>(
label,
alias,
otherLabel,
otherAlias): this;
Defined in: src/query/clauses.ts:198
Add bidirectional edge
Type Parameters
| Type Parameter |
|---|
E extends string | number | symbol |
Parameters
| Parameter | Type | Description |
|---|---|---|
label | E | Edge label |
alias | string | Edge alias |
otherLabel | keyof T["vertices"] | Other vertex label |
otherAlias | string | Other vertex alias |
Returns
this
This match clause
Implementation of
done()
done(): IQueryBuilder<T>;
Defined in: src/query/clauses.ts:244
Return to the main query builder
Returns
Query builder