pub enum Condition {
Condition(Pair, Operator),
And(Box<Condition>, Box<Condition>),
Or(Box<Condition>, Box<Condition>),
}
Variants§
Implementations§
Source§impl Condition
impl Condition
pub fn add_param_value(&self, str: &mut String)
pub fn bind_to_query<'a, DB: Database>(
&self,
query: Query<'a, DB, DB::Arguments<'a>>,
) -> Query<'a, DB, DB::Arguments<'a>>where
Option<bool>: Encode<'a, DB> + Decode<'a, DB>,
bool: Type<DB>,
Option<i16>: Encode<'a, DB> + Decode<'a, DB>,
i16: Type<DB>,
Option<i32>: Encode<'a, DB> + Decode<'a, DB>,
i32: Type<DB>,
Option<i64>: Encode<'a, DB> + Decode<'a, DB>,
i64: Type<DB>,
Option<f64>: Encode<'a, DB> + Decode<'a, DB>,
f64: Type<DB>,
Option<f32>: Encode<'a, DB> + Decode<'a, DB>,
f32: Type<DB>,
Option<NaiveDateTime>: Encode<'a, DB> + Decode<'a, DB>,
NaiveDateTime: Type<DB>,
Option<String>: Encode<'a, DB> + Decode<'a, DB>,
String: Type<DB>,
Option<Vec<u8>>: Encode<'a, DB> + Decode<'a, DB>,
Vec<u8>: Type<DB>,
pub fn bind_to_query_as<'a, O, DB: Database>(
&self,
query: QueryAs<'a, DB, O, DB::Arguments<'a>>,
) -> QueryAs<'a, DB, O, DB::Arguments<'a>>where
Option<bool>: Encode<'a, DB> + Decode<'a, DB>,
bool: Type<DB>,
Option<i16>: Encode<'a, DB> + Decode<'a, DB>,
i16: Type<DB>,
Option<i32>: Encode<'a, DB> + Decode<'a, DB>,
i32: Type<DB>,
Option<i64>: Encode<'a, DB> + Decode<'a, DB>,
i64: Type<DB>,
Option<f64>: Encode<'a, DB> + Decode<'a, DB>,
f64: Type<DB>,
Option<f32>: Encode<'a, DB> + Decode<'a, DB>,
f32: Type<DB>,
Option<NaiveDateTime>: Encode<'a, DB> + Decode<'a, DB>,
NaiveDateTime: Type<DB>,
Option<String>: Encode<'a, DB> + Decode<'a, DB>,
String: Type<DB>,
Option<Vec<u8>>: Encode<'a, DB> + Decode<'a, DB>,
Vec<u8>: Type<DB>,
pub fn bind_to_query_scalar<'a, O, DB: Database>(
&self,
query: QueryScalar<'a, DB, O, DB::Arguments<'a>>,
) -> QueryScalar<'a, DB, O, DB::Arguments<'a>>where
Option<bool>: Encode<'a, DB> + Decode<'a, DB>,
bool: Type<DB>,
Option<i16>: Encode<'a, DB> + Decode<'a, DB>,
i16: Type<DB>,
Option<i32>: Encode<'a, DB> + Decode<'a, DB>,
i32: Type<DB>,
Option<i64>: Encode<'a, DB> + Decode<'a, DB>,
i64: Type<DB>,
Option<f64>: Encode<'a, DB> + Decode<'a, DB>,
f64: Type<DB>,
Option<f32>: Encode<'a, DB> + Decode<'a, DB>,
f32: Type<DB>,
Option<NaiveDateTime>: Encode<'a, DB> + Decode<'a, DB>,
NaiveDateTime: Type<DB>,
Option<String>: Encode<'a, DB> + Decode<'a, DB>,
String: Type<DB>,
Option<Vec<u8>>: Encode<'a, DB> + Decode<'a, DB>,
Vec<u8>: Type<DB>,
pub fn sql(&self, param_index: usize, quoter: &Quoter) -> (String, usize)
Trait Implementations§
Source§impl<'a> WhereAppend<Condition> for DeleteBuilder<'a>
impl<'a> WhereAppend<Condition> for DeleteBuilder<'a>
Source§impl<'a> WhereAppend<Condition> for SelectBuilder<'a>
impl<'a> WhereAppend<Condition> for SelectBuilder<'a>
Source§impl<'a> WhereAppend<Condition> for UpdateBuilder<'a>
impl<'a> WhereAppend<Condition> for UpdateBuilder<'a>
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin 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