pub enum Expr {
Show 19 variants
Literal(Literal),
Parameter {
index: u32,
name: Option<NameId>,
},
Column {
database: Option<NameId>,
table: Option<NameId>,
column: NameId,
},
Star {
table: Option<NameId>,
},
Unary {
op: UnaryOp,
operand: ExprId,
},
Binary {
op: BinaryOp,
left: ExprId,
right: ExprId,
},
Collate {
operand: ExprId,
collation: NameId,
},
Cast {
operand: ExprId,
declared: NameId,
},
Pattern {
negated: bool,
op: PatternOp,
operand: ExprId,
pattern: ExprId,
escape: Option<ExprId>,
},
Between {
negated: bool,
operand: ExprId,
low: ExprId,
high: ExprId,
},
In {
negated: bool,
operand: ExprId,
rhs: InRhs,
},
IsNull {
negated: bool,
operand: ExprId,
},
Is {
negated: bool,
distinct_from: bool,
left: ExprId,
right: ExprId,
},
Case {
operand: Option<ExprId>,
branches: Vec<(ExprId, ExprId)>,
otherwise: Option<ExprId>,
},
Function {
name: NameId,
distinct: bool,
arguments: Option<Vec<ExprId>>,
order_by: Vec<OrderTerm>,
filter: Option<ExprId>,
over: Option<WindowId>,
},
Exists {
negated: bool,
select: SelectId,
},
Subquery(SelectId),
RowValue(Vec<ExprId>),
Raise {
action: RaiseAction,
message: Option<Vec<u8>>,
},
}Expand description
An expression, in the shape it was written.
Variants§
Literal(Literal)
A literal.
Parameter
A bound parameter.
Fields
Column
A column reference, with as much qualification as was written.
Fields
Star
* or table.*, legal only where the grammar allows it.
Unary
A unary operator applied to one operand.
Binary
A binary operator applied to two operands.
Collate
expr COLLATE name.
Cast
CAST(expr AS type).
Pattern
expr [NOT] LIKE|GLOB|REGEXP|MATCH pattern [ESCAPE expr].
Fields
Between
expr [NOT] BETWEEN low AND high.
Fields
In
expr [NOT] IN rhs.
Fields
IsNull
expr ISNULL / expr NOTNULL / expr IS [NOT] NULL.
Is
left IS [NOT] [DISTINCT FROM] right.
Fields
Case
CASE [operand] WHEN ... THEN ... [ELSE ...] END.
Fields
Function
A function call, aggregate or scalar or window.
Fields
Exists
[NOT] EXISTS (SELECT ...).
Subquery(SelectId)
A scalar subquery.
RowValue(Vec<ExprId>)
A parenthesised list of two or more expressions.
Raise
RAISE(...), legal only inside a trigger body.
Trait Implementations§
impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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