pub enum Expr {
Show 20 variants
Column(String),
Literal(Literal),
And(Vec<Expr>),
Or(Vec<Expr>),
Not(Box<Expr>),
Eq(Box<Expr>, Box<Expr>),
Ne(Box<Expr>, Box<Expr>),
Gt(Box<Expr>, Box<Expr>),
Gte(Box<Expr>, Box<Expr>),
Lt(Box<Expr>, Box<Expr>),
Lte(Box<Expr>, Box<Expr>),
In(Box<Expr>, Vec<Literal>),
NotIn(Box<Expr>, Vec<Literal>),
IsNull(Box<Expr>),
IsNotNull(Box<Expr>),
Like(Box<Expr>, String),
Contains(Box<Expr>, String),
InSubquery(Box<Expr>, Box<Select>),
Exists(Box<Select>),
NotExists(Box<Select>),
}Expand description
A query expression.
Variants§
Column(String)
Reference to a table column.
Literal(Literal)
A constant value.
And(Vec<Expr>)
Logical conjunction.
Or(Vec<Expr>)
Logical disjunction.
Not(Box<Expr>)
Logical negation.
Eq(Box<Expr>, Box<Expr>)
Equality.
Ne(Box<Expr>, Box<Expr>)
Inequality.
Gt(Box<Expr>, Box<Expr>)
Greater than.
Gte(Box<Expr>, Box<Expr>)
Greater than or equal.
Lt(Box<Expr>, Box<Expr>)
Less than.
Lte(Box<Expr>, Box<Expr>)
Less than or equal.
In(Box<Expr>, Vec<Literal>)
Membership in a list.
NotIn(Box<Expr>, Vec<Literal>)
Non-membership in a list.
IsNull(Box<Expr>)
IS NULL test.
IsNotNull(Box<Expr>)
IS NOT NULL test.
Like(Box<Expr>, String)
SQL LIKE pattern match (%/_ wildcards).
Contains(Box<Expr>, String)
Case-sensitive substring containment. Equivalent to LIKE '%needle%'
but without treating %/_ in the needle as wildcards.
InSubquery(Box<Expr>, Box<Select>)
Membership in the rows produced by a sub-SELECT (its first projected
column). The subquery is evaluated against the same execution context, so
it may read other tables or materialized CTEs.
Exists(Box<Select>)
EXISTS (subquery) — true when the subquery yields at least one row.
NotExists(Box<Select>)
NOT EXISTS (subquery) — true when the subquery yields no rows.
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>,
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,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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