pub enum CondOp {
Eq,
Ne,
Gt,
Gte,
Lt,
Lte,
Like,
ILike,
In,
NotIn,
IsNull,
IsNotNull,
}Expand description
Comparison operator for a WHERE condition.
Used in [QueryBuilder::r#where] and QueryBuilder::or_where.
| Variant | SQL | MongoDB |
|---|---|---|
Eq | = $1 | { field: value } |
Ne | != $1 | { field: { $ne: value } } |
Gt / Gte / Lt / Lte | > / >= / < / <= | $gt / $gte / $lt / $lte |
Like | LIKE $1 | regex (.* for %) |
ILike | ILIKE $1 (Postgres) | regex with i flag |
In | IN (...) | { $in: [...] } |
IsNull | IS NULL | { $type: 10 } |
IsNotNull | IS NOT NULL | { $not: { $type: 10 } } |
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CondOp
impl RefUnwindSafe for CondOp
impl Send for CondOp
impl Sync for CondOp
impl Unpin for CondOp
impl UnsafeUnpin for CondOp
impl UnwindSafe for CondOp
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