pub enum Expression {
Show 14 variants
Constant(Constant),
Variable(String),
Parameter(String),
PropertyAccess(Box<Expression>, String),
FunctionCall(String, Vec<Expression>),
BinaryOp(BinaryOp, Box<Expression>, Box<Expression>),
UnaryOp(UnaryOp, Box<Expression>),
List(Vec<Expression>),
Map(Vec<(String, Expression)>),
ExistsSubquery(Box<Query>),
Case(CaseExpr),
Star,
ListPredicate {
quantifier: Quantifier,
list: Box<Expression>,
var_name: String,
predicate: Box<Expression>,
},
Lambda {
var_name: String,
body: Box<Expression>,
},
}Expand description
An expression in a Cypher query.
Variants§
Constant(Constant)
Variable(String)
Parameter(String)
A query parameter reference like $name or $age.
PropertyAccess(Box<Expression>, String)
FunctionCall(String, Vec<Expression>)
BinaryOp(BinaryOp, Box<Expression>, Box<Expression>)
UnaryOp(UnaryOp, Box<Expression>)
List(Vec<Expression>)
Map(Vec<(String, Expression)>)
ExistsSubquery(Box<Query>)
EXISTS { MATCH … WHERE … } — returns true if the pattern matches.
Case(CaseExpr)
CASE [subject] WHEN … THEN … [ELSE …] END
Star
STAR expression — represents * in RETURN *.
The binder expands this to all variables in scope.
ListPredicate
ANY/ALL/NONE/SINGLE list predicates. Example: ANY(x IN [1,2,3] WHERE x > 5)
Lambda
Lambda expression for list_transform, list_filter, list_reduce. Example: x -> x + 1 or (x, y) -> x + y
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl PartialEq for Expression
impl PartialEq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnsafeUnpin for Expression
impl UnwindSafe for Expression
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more