Skip to main content
Version: 0.3.0

IMatchClause

age-schema-client v0.3.0


age-schema-client / IMatchClause

Interface: IMatchClause<T, L>

Defined in: src/query/types.ts:321

Match clause interface

Type Parameters

Type Parameter
T extends SchemaDefinition
L extends keyof T["vertices"]

Methods

constraint()

constraint(properties): this;

Defined in: src/query/types.ts:332

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


where()

where(condition, params?): this;

Defined in: src/query/types.ts:341

Add WHERE clause

Parameters

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

Returns

this

This match clause


outgoing()

outgoing<E>(
label,
alias,
targetLabel,
targetAlias): this;

Defined in: src/query/types.ts:346

Add outgoing edge

Type Parameters

Type Parameter
E extends string | number | symbol

Parameters

ParameterType
labelE
aliasstring
targetLabelkeyof T["vertices"]
targetAliasstring

Returns

this


incoming()

incoming<E>(
label,
alias,
sourceLabel,
sourceAlias): this;

Defined in: src/query/types.ts:356

Add incoming edge

Type Parameters

Type Parameter
E extends string | number | symbol

Parameters

ParameterType
labelE
aliasstring
sourceLabelkeyof T["vertices"]
sourceAliasstring

Returns

this


related<E>(
label,
alias,
otherLabel,
otherAlias): this;

Defined in: src/query/types.ts:366

Add bidirectional edge

Type Parameters

Type Parameter
E extends string | number | symbol

Parameters

ParameterType
labelE
aliasstring
otherLabelkeyof T["vertices"]
otherAliasstring

Returns

this


done()

done(): IQueryBuilder<T>;

Defined in: src/query/types.ts:376

Return to the main query builder

Returns

IQueryBuilder<T>