pub trait SqliteOperation<T>: Expressive<T>{
Show 15 methods
// Provided methods
fn or_(&self, other: impl Expressive<T>) -> ConditionGroup<T>
where Self: Sized { ... }
fn and_(&self, other: impl Expressive<T>) -> ConditionGroup<T>
where Self: Sized { ... }
fn eq(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn ne(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn gt(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn gte(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn lt(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn lte(&self, value: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn in_(&self, values: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
where Self: Sized,
T: Clone { ... }
fn not_in(&self, values: impl Expressive<T>) -> SqliteCondition
where Self: Sized { ... }
fn not_in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
where Self: Sized,
T: Clone { ... }
fn cast(&self, type_name: &str) -> SqliteCondition
where Self: Sized { ... }
fn is_null(&self) -> SqliteCondition
where Self: Sized { ... }
fn is_not_null(&self) -> SqliteCondition
where Self: Sized { ... }
}Expand description
Vendor-specific operations producing the backend’s condition type.
Blanket-implemented for all Expressive<T> where T: Into<AnyType>.
The condition type itself implements Expressive<AnyType>, enabling
cross-type chaining like price.gt(10).eq(false).
Provided Methods§
Sourcefn or_(&self, other: impl Expressive<T>) -> ConditionGroup<T>where
Self: Sized,
fn or_(&self, other: impl Expressive<T>) -> ConditionGroup<T>where
Self: Sized,
(self OR other) — joins two conditions into a
ConditionGroup.
Use this method to write alternatives. Do not write
"a OR b" as text. The group writes its own brackets,
and it keeps its meaning next to the other conditions.
Text has no brackets, and AND binds more tightly than
OR. Thus role = 'admin' AND a OR b means
(role = 'admin' AND a) OR b.
A chain stays flat: a.or_(b).or_(c) gives
(a OR b OR c).
Sourcefn and_(&self, other: impl Expressive<T>) -> ConditionGroup<T>where
Self: Sized,
fn and_(&self, other: impl Expressive<T>) -> ConditionGroup<T>where
Self: Sized,
(self AND other) — joins two conditions into a
ConditionGroup.
A table joins its conditions with AND already. Use this
method when you must make a group inside an or_.
Sourcefn eq(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn eq(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field = value
Sourcefn ne(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn ne(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field != value
Sourcefn gt(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn gt(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field > value
Sourcefn gte(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn gte(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field >= value
Sourcefn lt(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn lt(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field < value
Sourcefn lte(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn lte(&self, value: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field <= value
Sourcefn in_(&self, values: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn in_(&self, values: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field IN (values_expression)
Sourcefn in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
fn in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
field IN (a, b, c) from a slice of scalar values
Sourcefn not_in(&self, values: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
fn not_in(&self, values: impl Expressive<T>) -> SqliteConditionwhere
Self: Sized,
field NOT IN (values_expression)
Sourcefn not_in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
fn not_in_list<V: Into<T> + Clone>(&self, values: &[V]) -> SqliteCondition
field NOT IN (a, b, c) from a slice of scalar values
Sourcefn cast(&self, type_name: &str) -> SqliteConditionwhere
Self: Sized,
fn cast(&self, type_name: &str) -> SqliteConditionwhere
Self: Sized,
CAST(expr AS type_name)
Sourcefn is_null(&self) -> SqliteConditionwhere
Self: Sized,
fn is_null(&self) -> SqliteConditionwhere
Self: Sized,
field IS NULL
Sourcefn is_not_null(&self) -> SqliteConditionwhere
Self: Sized,
fn is_not_null(&self) -> SqliteConditionwhere
Self: Sized,
field IS NOT NULL
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T, S> SqliteOperation<T> for S
Blanket: any Expressive<T> where T: Into<AnyType> gets the
operation trait for free.