pub enum AstFilter {
Show 14 variants
Compare {
field: FieldRef,
op: CompareOp,
value: Value,
},
CompareFields {
left: FieldRef,
op: CompareOp,
right: FieldRef,
},
CompareExpr {
lhs: Expr,
op: CompareOp,
rhs: Expr,
},
And(Box<Filter>, Box<Filter>),
Or(Box<Filter>, Box<Filter>),
Not(Box<Filter>),
IsNull(FieldRef),
IsNotNull(FieldRef),
In {
field: FieldRef,
values: Vec<Value>,
},
Between {
field: FieldRef,
low: Value,
high: Value,
},
Like {
field: FieldRef,
pattern: String,
},
StartsWith {
field: FieldRef,
prefix: String,
},
EndsWith {
field: FieldRef,
suffix: String,
},
Contains {
field: FieldRef,
substring: String,
},
}Expand description
Filter condition
Variants§
Compare
Comparison: field op value
CompareFields
Field-to-field comparison: left.field op right.field. Used when
WHERE / BETWEEN operands reference another column instead of a
literal — the pre-Fase-2-parser-v2 shim for column-to-column
predicates. Once the Expr-rewrite lands, this collapses into
Compare { left: Expr, op, right: Expr }.
CompareExpr
Expression-to-expression comparison: lhs op rhs where either
side may be an arbitrary Expr tree (function call, CAST,
arithmetic, nested CASE). This is the most general compare
variant — Compare and CompareFields stay as fast-path
specialisations because the planner / cost model / index
selector all pattern-match on the simpler shapes. The parser
only emits this variant when a simpler one cannot express the
predicate.
And(Box<Filter>, Box<Filter>)
Logical AND
Or(Box<Filter>, Box<Filter>)
Logical OR
Not(Box<Filter>)
Logical NOT
IsNull(FieldRef)
IS NULL
IsNotNull(FieldRef)
IS NOT NULL
In
IN (value1, value2, …)
Between
BETWEEN low AND high
Like
LIKE pattern
StartsWith
STARTS WITH prefix
EndsWith
ENDS WITH suffix
Contains
CONTAINS substring
Implementations§
Trait Implementations§
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnsafeUnpin for Filter
impl UnwindSafe 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
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request