pub enum Expr {
Show 14 variants
Literal(Literal),
Column {
table: Option<String>,
name: String,
span: Span,
},
Binary {
left: Box<Expr>,
op: BinaryOp,
right: Box<Expr>,
},
Unary {
op: UnaryOp,
operand: Box<Expr>,
},
Function(FunctionCall),
Subquery(Box<SelectStatement>),
IsNull {
expr: Box<Expr>,
negated: bool,
},
In {
expr: Box<Expr>,
list: Vec<Expr>,
negated: bool,
},
Between {
expr: Box<Expr>,
low: Box<Expr>,
high: Box<Expr>,
negated: bool,
},
Case {
operand: Option<Box<Expr>>,
when_clauses: Vec<(Expr, Expr)>,
else_clause: Option<Box<Expr>>,
},
Cast {
expr: Box<Expr>,
data_type: DataType,
},
Paren(Box<Expr>),
Parameter {
name: Option<String>,
position: usize,
},
Wildcard {
table: Option<String>,
},
}Expand description
An SQL expression.
A literal value.
A column reference (optionally qualified with table name).
Fields
A binary expression.
Fields
A unary expression.
Fields
A function call.
A subquery.
IS NULL expression.
Fields
Whether this is IS NOT NULL.
IN expression.
Fields
The list of values or subquery.
BETWEEN expression.
Fields
Whether this is NOT BETWEEN.
CASE expression.
Fields
CAST expression.
Fields
Parenthesized expression.
A parameter placeholder (? or :name).
Fields
The parameter index or name.
Position in the query (1-based for ? placeholders).
Wildcard (*) in SELECT.
Fields
Table qualifier (optional).
Source§
Source
Creates a new column reference.
Source
Creates a new qualified column reference.
Source
Creates a new integer literal.
Source
Creates a new float literal.
Source
Creates a new string literal.
Source
Creates a new boolean literal.
Source
Creates a NULL literal.
Source
Creates a binary expression.
Source
Creates an equality expression.
Source
Creates an inequality expression.
Source
Creates a less-than expression.
Source
Creates a less-than-or-equal expression.
Source
Creates a greater-than expression.
Source
Creates a greater-than-or-equal expression.
Source
Creates an AND expression.
Source
Creates an OR expression.
Source
Creates an IS NULL expression.
Source
Creates an IS NOT NULL expression.
Source
Creates a BETWEEN expression.
Source
Creates a NOT BETWEEN expression.
Source
Creates an IN expression.
Source
Creates a NOT IN expression.