Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract Syntax Tree for Cypher queries

This module defines the AST nodes for representing parsed Cypher queries. The AST is designed to capture the essential graph patterns while being simple enough to translate to SQL efficiently.

Structs§

CypherQuery
A complete Cypher query
LengthRange
Length range for variable-length paths
MatchClause
A MATCH clause containing graph patterns
NodePattern
A node pattern in a graph query
OrderByClause
ORDER BY clause
OrderByItem
An item in the ORDER BY clause
PathPattern
A path pattern connecting nodes through relationships
PathSegment
A segment of a path (relationship + end node)
PropertyRef
Reference to a property of a node or relationship
RelationshipPattern
A relationship pattern
ReturnClause
RETURN clause specifying what to return
ReturnItem
An item in the RETURN clause
UnwindClause
An UNWIND clause
WhereClause
WHERE clause for filtering
WithClause
WITH clause for intermediate projections/aggregations

Enums§

ArithmeticOperator
Arithmetic operators
BooleanExpression
Boolean expressions in WHERE clauses
ComparisonOperator
Comparison operators
DistanceMetric
Distance metric for vector similarity
FunctionType
Function type classification
GraphPattern
A graph pattern (nodes and relationships)
PropertyValue
Property value in patterns and expressions
ReadingClause
A clause that reads from the graph (MATCH, UNWIND)
RelationshipDirection
Direction of a relationship
SortDirection
Sort direction for ORDER BY
ValueExpression
Value expressions (for comparisons and return values)

Functions§

classify_function
Classify a function by name