Skip to main content

Module ast

Module ast 

Source
Expand description

A fully owned, syntax-oriented openCypher abstract syntax tree.

The tree describes what was written; it does not perform name resolution, type checking, query planning, or execution. Every syntactic node carries a half-open UTF-8 byte Span. Trivia remains available from the lossless token stream and is not attached to AST nodes.

Modules§

visit
Read-only, depth-first traversal of the AST’s structural nodes.

Structs§

Binding
An expression bound to a variable.
CallClause
Invokes a procedure or a subquery.
CaseAlternative
One WHEN ... THEN ... arm.
CaseExpression
A searched or simple CASE expression.
CreateClause
Creates graph elements described by a pattern.
DeleteClause
Deletes values or graph elements.
ErrorNode
A marker inserted where error recovery skipped malformed syntax.
FilterClause
Keeps rows satisfying an expression.
FloatLiteral
A floating-point spelling preserved without rounding.
ForeachClause
Applies updating clauses for each item in a list.
FunctionInvocation
A function call.
Identifier
An identifier and whether it was backtick escaped.
InTransactions
Batched transaction behavior for a subquery call.
InsertClause
Inserts graph elements using GQL-aligned pattern syntax.
IntegerLiteral
An integer spelling and its radix.
LetClause
Introduces one or more variable bindings.
ListComprehension
A list comprehension.
LoadCsvClause
Loads delimited records from a URL expression.
MapEntry
A map entry.
MapProjection
A projection derived from an existing map or graph element.
MatchClause
A MATCH clause.
MergeAction
An ON MATCH or ON CREATE action.
MergeClause
Matches or creates a single pattern and applies conditional updates.
Node
A syntax value and its source extent.
NodePattern
A node pattern (variable:Label {properties}).
OrderBy
Sort specifications following ORDER BY.
Parameter
A parameter reference without its leading $.
PathPatternKind
Ordered factors in a path pattern.
Pattern
A graph pattern.
PatternComprehension
A pattern comprehension.
PatternPartKind
The contents of a pattern part.
Program
A complete source input containing zero or one query statement.
ProjectionClause
A projection body shared by RETURN, WITH, and GQL-aligned SELECT.
QualifiedName
A dot-separated name such as a procedure or function name.
QuantifiedPredicate
An ALL, ANY, NONE, or SINGLE predicate over a list.
Quantifier
Repetition applied to a node, relationship, or parenthesized path.
QueryStatement
A query statement and its optional execution prefix.
ReduceExpression
A left fold over a list.
RegularQuery
A query connected by zero or more set unions.
RelationshipPattern
A relationship pattern between two nodes.
RemoveClause
A collection of removals following REMOVE.
ReturnClause
Produces the final rows from a query.
SetClause
A collection of assignments following SET.
SingleQueryKind
The contents of a single query.
SortItem
One expression and its requested ordering.
StringLiteral
A decoded string value and its delimiter style.
SubqueryExpression
A query nested inside an expression.
SubqueryScope
Variables imported into a CALL { ... } subquery.
TypeRefKind
A type expression and its nullability marker.
UnionBranch
A UNION operator and the query to its right.
UnwindClause
Expands a list expression into rows.
UseClause
Selects the graph against which the following query runs.
WithClause
Projects intermediate values and continues a query.
YieldClause
Selects values produced by a procedure call.

Enums§

BinaryOperator
An infix operator, ordered by the grammar’s precedence rules.
CallTarget
The target of a CALL clause.
ClauseKind
Any clause in an openCypher query.
DeleteMode
Relationship handling for a delete operation.
ExecutionMode
A query execution prefix.
ExprKind
Any expression in openCypher 2024.3.
IntegerRadix
The radix of an integer literal.
IsPredicate
A predicate following IS or IS NOT.
LabelExpressionKind
The form of a label/type boolean expression.
LiteralKind
A literal value as represented in source.
MapProjectionItemKind
The form of a map projection item.
MatchHintKind
The form of a planner hint.
MergeTrigger
The event that triggers a merge action.
NormalizationForm
Unicode normalization requested by an expression predicate.
NullOrder
Placement of null values in sorted output.
ParameterName
The form of a parameter name.
PathFactorKind
The form of a path factor.
PathMode
Restrictions on repeated elements in a path.
PathSelector
Selection applied to matching paths.
ProjectionItemKind
The form of a projection item.
QuantifiedPredicateKind
Quantification applied to a list predicate.
QuantifierKind
A path repetition form. Bounds retain their original decimal spelling.
QueryKind
The syntactic form of a query.
QuoteStyle
Quote style used for a string literal.
RelationshipDirection
Direction indicated by a relationship pattern’s arrows.
RemoveItemKind
The form of a removal.
SetItemKind
The form of an assignment.
SetQuantifier
Duplicate handling explicitly written for a projection or function call.
SortDirection
Sort direction.
StatementKind
The syntactic form of a top-level statement.
SubqueryExpressionKind
The value produced by a subquery expression.
TransactionErrorBehavior
Error handling for CALL { ... } IN TRANSACTIONS.
UnaryOperator
A prefix operator.
UnionOperator
Duplicate handling for a query union.
ValueType
A value type named by the grammar.

Type Aliases§

Clause
A query clause.
Expr
An expression.
LabelExpression
A label/type boolean expression.
Literal
A literal expression.
MapProjectionItem
One item in a map projection.
MatchHint
A planner hint attached to MATCH.
Name
A spanned identifier.
PathFactor
One factor in a path pattern.
PathPattern
A path pattern composed from node, relationship, and grouped factors.
PatternPart
A selected path pattern and optional path-variable binding.
ProjectionItem
One expression or wildcard in a projection.
Query
A regular query.
RemoveItem
A single REMOVE operation.
SetItem
A single SET assignment.
SingleQuery
A sequence of query clauses evaluated from left to right.
Statement
A top-level statement.
TypeRef
A value type used by typed predicates.