pub enum Expr {
Show 22 variants
Identifier(String),
CompoundIdentifier {
alias: String,
ident: String,
},
IsNull(Box<Expr>),
IsNotNull(Box<Expr>),
InList {
expr: Box<Expr>,
list: Vec<Expr>,
negated: bool,
},
InSubquery {
expr: Box<Expr>,
subquery: Box<Query>,
negated: bool,
},
Between {
expr: Box<Expr>,
negated: bool,
low: Box<Expr>,
high: Box<Expr>,
},
Like {
expr: Box<Expr>,
negated: bool,
pattern: Box<Expr>,
},
ILike {
expr: Box<Expr>,
negated: bool,
pattern: Box<Expr>,
},
BinaryOp {
left: Box<Expr>,
op: BinaryOperator,
right: Box<Expr>,
},
UnaryOp {
op: UnaryOperator,
expr: Box<Expr>,
},
Nested(Box<Expr>),
Literal(AstLiteral),
TypedString {
data_type: DataType,
value: String,
},
Function(Box<Function>),
Aggregate(Box<Aggregate>),
Exists {
subquery: Box<Query>,
negated: bool,
},
Subquery(Box<Query>),
Case {
operand: Option<Box<Expr>>,
when_then: Vec<(Expr, Expr)>,
else_result: Option<Box<Expr>>,
},
ArrayIndex {
obj: Box<Expr>,
indexes: Vec<Expr>,
},
Interval {
expr: Box<Expr>,
leading_field: Option<DateTimeField>,
last_field: Option<DateTimeField>,
},
Array {
elem: Vec<Expr>,
},
}Variants§
Identifier(String)
CompoundIdentifier
IsNull(Box<Expr>)
IsNotNull(Box<Expr>)
InList
InSubquery
Between
Like
ILike
BinaryOp
UnaryOp
Nested(Box<Expr>)
Literal(AstLiteral)
TypedString
Function(Box<Function>)
Aggregate(Box<Aggregate>)
Exists
Subquery(Box<Query>)
Case
ArrayIndex
Interval
Array
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ToSqlUnquoted for Expr
impl ToSqlUnquoted for Expr
fn to_sql_unquoted(&self) -> String
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more