pub struct Cond { /* private fields */ }Expand description
Cond 提供构造条件表达式的辅助方法。
Implementations§
Source§impl Cond
impl Cond
pub fn equal(&self, field: &str, value: impl Into<Arg>) -> String
pub fn e(&self, field: &str, value: impl Into<Arg>) -> String
pub fn eq(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_equal(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ne(&self, field: &str, value: impl Into<Arg>) -> String
pub fn neq(&self, field: &str, value: impl Into<Arg>) -> String
pub fn greater_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn g(&self, field: &str, value: impl Into<Arg>) -> String
pub fn gt(&self, field: &str, value: impl Into<Arg>) -> String
pub fn greater_equal_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ge(&self, field: &str, value: impl Into<Arg>) -> String
pub fn gte(&self, field: &str, value: impl Into<Arg>) -> String
pub fn less_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn l(&self, field: &str, value: impl Into<Arg>) -> String
pub fn lt(&self, field: &str, value: impl Into<Arg>) -> String
pub fn less_equal_than(&self, field: &str, value: impl Into<Arg>) -> String
pub fn le(&self, field: &str, value: impl Into<Arg>) -> String
pub fn lte(&self, field: &str, value: impl Into<Arg>) -> String
pub fn like(&self, field: &str, value: impl Into<Arg>) -> String
pub fn ilike(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_like(&self, field: &str, value: impl Into<Arg>) -> String
pub fn not_ilike(&self, field: &str, value: impl Into<Arg>) -> String
pub fn is_null(&self, field: &str) -> String
pub fn is_not_null(&self, field: &str) -> String
pub fn between( &self, field: &str, lower: impl Into<Arg>, upper: impl Into<Arg>, ) -> String
pub fn not_between( &self, field: &str, lower: impl Into<Arg>, upper: impl Into<Arg>, ) -> String
pub fn in_( &self, field: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn not_in( &self, field: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn or<T>(&self, exprs: T) -> Stringwhere
T: IntoStrings,
pub fn and<T>(&self, exprs: T) -> Stringwhere
T: IntoStrings,
pub fn not(&self, expr: impl Into<String>) -> String
pub fn exists(&self, subquery: impl Into<Arg>) -> String
pub fn not_exists(&self, subquery: impl Into<Arg>) -> String
pub fn any( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn all( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn some( &self, field: &str, op: &str, values: impl IntoIterator<Item = impl Into<Arg>>, ) -> String
pub fn is_distinct_from(&self, field: &str, value: impl Into<Arg>) -> String
pub fn is_not_distinct_from(&self, field: &str, value: impl Into<Arg>) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cond
impl !RefUnwindSafe for Cond
impl !Send for Cond
impl !Sync for Cond
impl Unpin for Cond
impl !UnwindSafe for Cond
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