pub struct Predicate {
pub column: String,
pub op: FilterOp,
pub value: PredicateValue,
}Expand description
A single predicate condition
Fields§
§column: StringColumn name
op: FilterOpFilter operation
value: PredicateValueValue(s) to compare against
Implementations§
Source§impl Predicate
impl Predicate
Sourcepub fn le(column: impl Into<String>, value: Value) -> Self
pub fn le(column: impl Into<String>, value: Value) -> Self
Create a less-than-or-equal predicate
Sourcepub fn ge(column: impl Into<String>, value: Value) -> Self
pub fn ge(column: impl Into<String>, value: Value) -> Self
Create a greater-than-or-equal predicate
Sourcepub fn between(column: impl Into<String>, low: Value, high: Value) -> Self
pub fn between(column: impl Into<String>, low: Value, high: Value) -> Self
Create a between predicate (inclusive)
Sourcepub fn like(column: impl Into<String>, pattern: impl Into<String>) -> Self
pub fn like(column: impl Into<String>, pattern: impl Into<String>) -> Self
Create a LIKE predicate
Sourcepub fn not_like(column: impl Into<String>, pattern: impl Into<String>) -> Self
pub fn not_like(column: impl Into<String>, pattern: impl Into<String>) -> Self
Create a NOT LIKE predicate
Sourcepub fn is_not_null(column: impl Into<String>) -> Self
pub fn is_not_null(column: impl Into<String>) -> Self
Create an IS NOT NULL predicate
Sourcepub fn starts_with(column: impl Into<String>, prefix: impl Into<String>) -> Self
pub fn starts_with(column: impl Into<String>, prefix: impl Into<String>) -> Self
Create a STARTS WITH predicate
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Predicate
impl RefUnwindSafe for Predicate
impl Send for Predicate
impl Sync for Predicate
impl Unpin for Predicate
impl UnsafeUnpin for Predicate
impl UnwindSafe for Predicate
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