pub enum SqlExpr {
Ident(String),
Number(String),
StringLit(String),
Bool(bool),
BinaryOp {
left: Box<SqlExpr>,
op: BinOp,
right: Box<SqlExpr>,
},
UnaryOp {
op: UnaryOp,
operand: Box<SqlExpr>,
},
FnCall {
name: String,
args: Vec<SqlExpr>,
},
Paren(Box<SqlExpr>),
}Expand description
A parsed SQL expression node.
Variants§
Ident(String)
Column reference or SQL keyword (e.g. price, COALESCE).
Number(String)
Numeric literal (e.g. 42, 3.14).
StringLit(String)
String literal (e.g. "hello").
Bool(bool)
Boolean literal (true / false).
BinaryOp
Binary operation (e.g. price * quantity).
UnaryOp
Unary operation (e.g. -amount).
FnCall
Function call (e.g. COALESCE(a, b)).
Paren(Box<SqlExpr>)
Parenthesised sub-expression.
Implementations§
Trait Implementations§
impl StructuralPartialEq for SqlExpr
Auto Trait Implementations§
impl Freeze for SqlExpr
impl RefUnwindSafe for SqlExpr
impl Send for SqlExpr
impl Sync for SqlExpr
impl Unpin for SqlExpr
impl UnsafeUnpin for SqlExpr
impl UnwindSafe for SqlExpr
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