Skip to main content

Class: RelPattern

Defined in: lang-cypher/src/ast/pattern.ts:45

A relationship pattern -[variable:TYPE*range {props}]-.

Implements

Constructors

Constructor

new RelPattern(pointsLeft?, pointsRight?, variable?, types?, range?, props?): RelPattern

Defined in: lang-cypher/src/ast/pattern.ts:46

Parameters

ParameterTypeDefault valueDescription
pointsLeftbooleanfalseTrue when the arrow points left (<-[...]-).
pointsRightbooleanfalseTrue when the arrow points right (-[...]->); both false means undirected.
variableCypherIdentifiernullOptional relationship variable; null if anonymous.
typesCypherIdentifier[][]Relationship type constraints; empty if unconstrained.
range[ASTNumberLiteral, ASTNumberLiteral]nullVariable-length hop bounds [min, max]; undefined in either position means unbounded on that side; null for a fixed-length (non-variable) relationship.
propsASTMapLiteral | ASTIdentifiernullProperty constraints as a map literal or parameter reference; null if none.

Returns

RelPattern

Properties

pointsLeft

pointsLeft: boolean = false

Defined in: lang-cypher/src/ast/pattern.ts:48

True when the arrow points left (<-[...]-).


pointsRight

pointsRight: boolean = false

Defined in: lang-cypher/src/ast/pattern.ts:50

True when the arrow points right (-[...]->); both false means undirected.


props

props: ASTMapLiteral | ASTIdentifier = null

Defined in: lang-cypher/src/ast/pattern.ts:64

Property constraints as a map literal or parameter reference; null if none.


range

range: [ASTNumberLiteral, ASTNumberLiteral] = null

Defined in: lang-cypher/src/ast/pattern.ts:59

Variable-length hop bounds [min, max]; undefined in either position means unbounded on that side; null for a fixed-length (non-variable) relationship.


types

types: CypherIdentifier[] = []

Defined in: lang-cypher/src/ast/pattern.ts:54

Relationship type constraints; empty if unconstrained.


variable

variable: CypherIdentifier = null

Defined in: lang-cypher/src/ast/pattern.ts:52

Optional relationship variable; null if anonymous.

Methods

accept()

accept<Ret, Arg>(visitor, arg?): Ret

Defined in: lang-cypher/src/ast/pattern.ts:67

Dispatches this node to the matching method on visitor.

Type Parameters

Type Parameter
Ret
Arg

Parameters

ParameterType
visitorCypherVisitor<Ret, Arg>
arg?Arg

Returns

Ret

Implementation of

ASTNode.accept