pub struct Filter(/* private fields */);Expand description
A typed condition on its way to a WHERE.
What a Column comparison produces. It is three things at once, which is
what lets typed filters mix with Layer 1 anywhere:
- a
Modon anything with aWHERE(HasWhere) — so it sits directly inusers::table().query((users::age().gte(21), …)), and equally in a raw dialect statement’s mod tuple; - an
IntoExpr— so it drops into any expression slot (select::where_, a join’son, aCASEarm); - a
Chain— so.and(…),.or(…)and every other Layer 1 operator keep working after the typed comparison started the chain.
Implementations§
Trait Implementations§
Source§impl Chain for Filter
impl Chain for Filter
Source§fn from_expr(e: Expr) -> Filter
fn from_expr(e: Expr) -> Filter
Wrap a finished expression back into the chain type. Read more
Source§fn step(self, f: impl FnOnce(Expr) -> Expr) -> Self
fn step(self, f: impl FnOnce(Expr) -> Expr) -> Self
One chain step: build a node from this expression, apply the
parenthesisation rule, and return a chain again. Read more
Source§fn op(self, op: &'static str, rhs: impl IntoExpr) -> Self
fn op(self, op: &'static str, rhs: impl IntoExpr) -> Self
An arbitrary infix operator:
self op rhs. Read moreSource§fn ne(self, rhs: impl IntoExpr) -> Self
fn ne(self, rhs: impl IntoExpr) -> Self
self <> rhs. The standard spelling, which every dialect accepts.Source§fn in_(self, vals: impl IntoExprList) -> Self
fn in_(self, vals: impl IntoExprList) -> Self
self IN (a, b, c). Read moreSource§fn not_in(self, vals: impl IntoExprList) -> Self
fn not_in(self, vals: impl IntoExprList) -> Self
self NOT IN (a, b, c).Source§fn is_not_null(self) -> Self
fn is_not_null(self) -> Self
self IS NOT NULL.Source§fn is_distinct_from(self, rhs: impl IntoExpr) -> Self
fn is_distinct_from(self, rhs: impl IntoExpr) -> Self
self IS DISTINCT FROM rhs.Source§fn is_not_distinct_from(self, rhs: impl IntoExpr) -> Self
fn is_not_distinct_from(self, rhs: impl IntoExpr) -> Self
self IS NOT DISTINCT FROM rhs.Source§fn not_between(self, a: impl IntoExpr, b: impl IntoExpr) -> Self
fn not_between(self, a: impl IntoExpr, b: impl IntoExpr) -> Self
self NOT BETWEEN a AND b.Source§fn concat(self, others: impl IntoExprList) -> Self
fn concat(self, others: impl IntoExprList) -> Self
self || a || b — string concatenation.Source§fn and(self, others: impl IntoExprList) -> Self
fn and(self, others: impl IntoExprList) -> Self
self AND a AND b.Source§fn or(self, others: impl IntoExprList) -> Self
fn or(self, others: impl IntoExprList) -> Self
self OR a OR b.Source§impl IntoExprList for Filter
impl IntoExprList for Filter
Source§fn into_expr_list(self) -> Vec<Expr>
fn into_expr_list(self) -> Vec<Expr>
Perform the conversion.
Auto Trait Implementations§
impl !RefUnwindSafe for Filter
impl !UnwindSafe for Filter
impl Freeze for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnsafeUnpin for Filter
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