pub enum Expr {
Show 24 variants
Between {
lhs: Box<Expr>,
not: bool,
start: Box<Expr>,
end: Box<Expr>,
},
Binary(Box<Expr>, Operator, Box<Expr>),
Case {
base: Option<Box<Expr>>,
when_then_pairs: Vec<(Expr, Expr)>,
else_expr: Option<Box<Expr>>,
},
Cast {
expr: Box<Expr>,
type_name: Option<Type>,
},
Collate(Box<Expr>, String),
DoublyQualified(Name, Name, Name),
Exists(Box<Select>),
FunctionCall {
name: Id,
distinctness: Option<Distinctness>,
args: Option<Vec<Expr>>,
order_by: Option<Vec<SortedColumn>>,
filter_over: Option<FunctionTail>,
},
FunctionCallStar {
name: Id,
filter_over: Option<FunctionTail>,
},
Id(Id),
InList {
lhs: Box<Expr>,
not: bool,
rhs: Option<Vec<Expr>>,
},
InSelect {
lhs: Box<Expr>,
not: bool,
rhs: Box<Select>,
},
InTable {
lhs: Box<Expr>,
not: bool,
rhs: QualifiedName,
args: Option<Vec<Expr>>,
},
IsNull(Box<Expr>),
Like {
lhs: Box<Expr>,
not: bool,
op: LikeOperator,
rhs: Box<Expr>,
escape: Option<Box<Expr>>,
},
Literal(Literal),
Name(Name),
NotNull(Box<Expr>),
Parenthesized(Vec<Expr>),
Qualified(Name, Name),
Raise(ResolveType, Option<Box<Expr>>),
Subquery(Box<Select>),
Unary(UnaryOperator, Box<Expr>),
Variable(String),
}Expand description
SQL expression
Variants§
Between
BETWEEN
Binary(Box<Expr>, Operator, Box<Expr>)
binary expression
Case
CASE expression
Fields
Cast
CAST expression
Collate(Box<Expr>, String)
COLLATE: expression
DoublyQualified(Name, Name, Name)
schema-name.table-name.column-name
Exists(Box<Select>)
EXISTS subquery
FunctionCall
call to a built-in function
Fields
§
distinctness: Option<Distinctness>DISTINCT
§
order_by: Option<Vec<SortedColumn>>ORDER BY
§
filter_over: Option<FunctionTail>FILTER
FunctionCallStar
Function call expression with ‘*’ as arg
Id(Id)
Identifier
InList
IN
InSelect
IN subselect
InTable
IN table name / function
Fields
§
rhs: QualifiedNametable name
IsNull(Box<Expr>)
IS NULL
Like
LIKE
Fields
§
op: LikeOperatoroperator
Literal(Literal)
Literal expression
Name(Name)
Name
NotNull(Box<Expr>)
NOT NULL or NOTNULL
Parenthesized(Vec<Expr>)
Parenthesized subexpression
Qualified(Name, Name)
Qualified name
Raise(ResolveType, Option<Box<Expr>>)
RAISE function call
Subquery(Box<Select>)
Subquery expression
Unary(UnaryOperator, Box<Expr>)
Unary expression
Variable(String)
Parameters
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn parenthesized(x: Self) -> Self
pub fn parenthesized(x: Self) -> Self
Constructor
Sourcepub fn like(
lhs: Self,
not: bool,
op: LikeOperator,
rhs: Self,
escape: Option<Self>,
) -> Self
pub fn like( lhs: Self, not: bool, op: LikeOperator, rhs: Self, escape: Option<Self>, ) -> Self
Constructor
Sourcepub fn unary(op: UnaryOperator, x: Self) -> Self
pub fn unary(op: UnaryOperator, x: Self) -> Self
Constructor
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.