pub enum Expression {
Literal(Literal),
Variable(String),
Parameter(String),
PropertyAccess {
variable: String,
property: String,
},
Binary {
left: Box<Expression>,
op: BinaryOp,
right: Box<Expression>,
},
Unary {
op: UnaryOp,
operand: Box<Expression>,
},
FunctionCall {
name: String,
args: Vec<Expression>,
},
List(Vec<Expression>),
Case {
input: Option<Box<Expression>>,
whens: Vec<(Expression, Expression)>,
else_clause: Option<Box<Expression>>,
},
ExistsSubquery {
query: Box<QueryStatement>,
},
}Expand description
An expression.
Variants§
Literal(Literal)
A literal value.
Variable(String)
A variable reference.
Parameter(String)
A parameter reference ($name).
PropertyAccess
A property access (var.prop).
Binary
A binary operation.
Unary
A unary operation.
FunctionCall
A function call.
List(Vec<Expression>)
A list expression.
Case
A CASE expression.
Fields
§
input: Option<Box<Expression>>Optional input expression.
§
whens: Vec<(Expression, Expression)>When clauses.
§
else_clause: Option<Box<Expression>>Else clause.
ExistsSubquery
EXISTS subquery expression - checks if inner query returns results.
Fields
§
query: Box<QueryStatement>The inner query pattern to check for existence.
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin 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