Skip to main content
Version: 0.3.0

EdgeMatchClause

age-schema-client v0.3.0


age-schema-client / EdgeMatchClause

Class: EdgeMatchClause<T>

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

Edge match clause implementation

Type Parameters

Type Parameter
T extends SchemaDefinition

Implements

Constructors

Constructor

new EdgeMatchClause<T>(
queryBuilder,
matchPart,
edgePattern): EdgeMatchClause<T>;

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

Create a new edge match clause

Parameters

ParameterTypeDescription
queryBuilderIQueryBuilder<T>Query builder
matchPartMatchPartMatch part
edgePatternEdgePatternEdge pattern

Returns

EdgeMatchClause<T>

Methods

constraint()

constraint(properties): this;

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

Add property constraints to the edge pattern

Parameters

ParameterTypeDescription
propertiesRecord<string, any>Object with property-value pairs

Returns

this

This edge match clause

Throws

Error if any property value is null, undefined, or NaN

Implementation of

IEdgeMatchClause.constraint


where()

where(condition, params?): this;

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

Add WHERE clause

Parameters

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

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.where


return()

return(...expressions): this;

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

Add RETURN clause

Parameters

ParameterTypeDescription
...expressionsstring[]Return expressions

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.return


orderBy()

orderBy(expression, direction?): this;

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

Add ORDER BY clause

Parameters

ParameterTypeDescription
expressionstringExpression to order by
direction?OrderDirectionOrder direction

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.orderBy


limit()

limit(count): this;

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

Add LIMIT clause

Parameters

ParameterTypeDescription
countnumberLimit count

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.limit


skip()

skip(count): this;

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

Add SKIP clause

Parameters

ParameterTypeDescription
countnumberSkip count

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.skip


with()

with(...expressions): this;

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

Add WITH clause

Parameters

ParameterTypeDescription
...expressionsstring[]With expressions

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.with


unwind()

unwind(expression, alias): this;

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

Add UNWIND clause

Parameters

ParameterTypeDescription
expressionstringExpression to unwind
aliasstringAlias for unwound items

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.unwind


withParam()

withParam(name, value): this;

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

Add a parameter to the query

Parameters

ParameterTypeDescription
namestringParameter name
valueanyParameter value

Returns

this

This edge match clause

Implementation of

IEdgeMatchClause.withParam


execute()

execute<R>(options?): QueryBuilderResult<R>;

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

Execute the query

Type Parameters

Type ParameterDefault type
Rany

Parameters

ParameterTypeDescription
options?QueryExecutionOptionsQuery execution options

Returns

QueryBuilderResult<R>

Query result

Implementation of

IEdgeMatchClause.execute


toCypher()

toCypher(): string;

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

Get the Cypher query string

Returns

string

Cypher query string

Implementation of

IEdgeMatchClause.toCypher


done()

done(): IQueryBuilder<T>;

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

Return to the main query builder

Returns

IQueryBuilder<T>

Query builder

Implementation of

IEdgeMatchClause.done