pub enum Expr {
Show 21 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>,
},
}
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
Trait Implementations§
source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Expr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Expr, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Expr
impl PartialEq for Expr
source§impl Serialize for Expr
impl Serialize for Expr
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl ToSqlUnquoted for Expr
impl ToSqlUnquoted for Expr
fn to_sql_unquoted(&self) -> String
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.