Skip to main content
Version: 0.3.0

MatchClause

age-schema-client v0.3.0


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

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

ParameterTypeDescription
queryBuilderIQueryBuilder<T>Query builder
matchPartMatchPartMatch part
vertexPatternVertexPatternVertex 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

ParameterTypeDescription
propertiesRecord<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

IMatchClause.constraint


where()

where(condition, params?): this;

Defined in: src/query/clauses.ts:83

Add WHERE clause

Parameters

ParameterTypeDescription
conditionstringCondition expression
params?Record<string, any>Parameters

Returns

this

This match clause

Implementation of

IMatchClause.where


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

ParameterTypeDescription
labelEEdge label
aliasstringEdge alias
targetLabelkeyof T["vertices"]Target vertex label
targetAliasstringTarget vertex alias

Returns

this

This match clause

Implementation of

IMatchClause.outgoing


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

ParameterTypeDescription
labelEEdge label
aliasstringEdge alias
sourceLabelkeyof T["vertices"]Source vertex label
sourceAliasstringSource vertex alias

Returns

this

This match clause

Implementation of

IMatchClause.incoming


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

ParameterTypeDescription
labelEEdge label
aliasstringEdge alias
otherLabelkeyof T["vertices"]Other vertex label
otherAliasstringOther vertex alias

Returns

this

This match clause

Implementation of

IMatchClause.related


done()

done(): IQueryBuilder<T>;

Defined in: src/query/clauses.ts:244

Return to the main query builder

Returns

IQueryBuilder<T>

Query builder

Implementation of

IMatchClause.done