#[non_exhaustive]pub enum Expr {
Show 21 variants
Literal(Literal),
Var(VarRef),
Property(PropertyAccess),
BinaryOp(BinaryOp),
UnaryOp(UnaryOp),
FunctionCall(FunctionCall),
List(ListLiteral),
Map(MapLiteral),
Param(ParamRef),
Case(CaseExpr),
ListComprehension(ListComprehension),
Quantifier(Quantifier),
PatternComprehension(PatternComprehension),
PatternPredicate(PatternPredicate),
ExistentialSubquery(ExistentialSubquery),
LabelPredicate(LabelPredicate),
IsNull {
expr: Box<Expr>,
negated: bool,
span: Span,
},
InList {
expr: Box<Expr>,
list: Box<Expr>,
negated: bool,
span: Span,
},
StringOp {
expr: Box<Expr>,
op: StringOpKind,
pattern: Box<Expr>,
span: Span,
},
RegexMatch {
expr: Box<Expr>,
pattern: Box<Expr>,
span: Span,
},
Parenthesized {
inner: Box<Expr>,
span: Span,
},
}Expand description
A Cypher expression.
Expr is recursive: Box<Expr> is used wherever a child expression is
needed to keep the enum Sized.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Literal(Literal)
An integer, float, string, boolean, or null literal.
Var(VarRef)
A variable reference: n.
Property(PropertyAccess)
A property access: n.prop.
BinaryOp(BinaryOp)
A binary operation: left op right.
UnaryOp(UnaryOp)
A unary operation: op expr (e.g. NOT x, -x).
FunctionCall(FunctionCall)
A function call: name(args) or name(DISTINCT arg).
List(ListLiteral)
A list literal: [1, 2, 3].
Map(MapLiteral)
A map literal: {key: expr}.
Param(ParamRef)
A Cypher parameter: $name.
Case(CaseExpr)
A CASE expression.
ListComprehension(ListComprehension)
A list comprehension: [x IN list WHERE pred | expr].
Quantifier(Quantifier)
A quantifier predicate: all/any/none/single(x IN list WHERE pred).
PatternComprehension(PatternComprehension)
A pattern comprehension: [(n)-[r]->(m) | r.weight].
PatternPredicate(PatternPredicate)
A pattern predicate: (n)-[:KNOWS]->(m).
ExistentialSubquery(ExistentialSubquery)
A simple or full existential subquery: exists { (n)-->(m) } or
exists { MATCH (n)-->(m) RETURN true }.
LabelPredicate(LabelPredicate)
A label predicate: n:Person.
IsNull
IS NULL / IS NOT NULL.
InList
x IN list / x NOT IN list.
StringOp
x STARTS WITH y / x ENDS WITH y / x CONTAINS y.
RegexMatch
x =~ pattern — regular expression match.
Parenthesized
A subexpression wrapped in parentheses (preserved for span accuracy).