pub enum Condition {
Show 14 variants
Eq {
column: String,
value: Value,
},
Ne {
column: String,
value: Value,
},
Gt {
column: String,
value: Value,
},
Gte {
column: String,
value: Value,
},
Lt {
column: String,
value: Value,
},
Lte {
column: String,
value: Value,
},
Like {
column: String,
pattern: String,
},
In {
column: String,
values: Vec<Value>,
},
IsNull {
column: String,
},
IsNotNull {
column: String,
},
And(Vec<Condition>),
Or(Vec<Condition>),
Not(Box<Condition>),
Raw {
sql: String,
params: Vec<Value>,
},
}Expand description
查询条件
Variants§
Eq
相等条件
Ne
不相等条件
Gt
大于条件
Gte
大于等于条件
Lt
小于条件
Lte
小于等于条件
Like
LIKE 条件
In
IN 条件
IsNull
IS NULL 条件
IsNotNull
IS NOT NULL 条件
And(Vec<Condition>)
AND 组合
Or(Vec<Condition>)
OR 组合
Not(Box<Condition>)
NOT 条件
Raw
原始 SQL 条件
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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