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) -> Predicate
pub fn le(column: impl Into<String>, value: Value) -> Predicate
Create a less-than-or-equal predicate
Sourcepub fn gt(column: impl Into<String>, value: Value) -> Predicate
pub fn gt(column: impl Into<String>, value: Value) -> Predicate
Create a greater-than predicate
Sourcepub fn ge(column: impl Into<String>, value: Value) -> Predicate
pub fn ge(column: impl Into<String>, value: Value) -> Predicate
Create a greater-than-or-equal predicate
Sourcepub fn between(column: impl Into<String>, low: Value, high: Value) -> Predicate
pub fn between(column: impl Into<String>, low: Value, high: Value) -> Predicate
Create a between predicate (inclusive)
Sourcepub fn in_list(column: impl Into<String>, values: Vec<Value>) -> Predicate
pub fn in_list(column: impl Into<String>, values: Vec<Value>) -> Predicate
Create an IN predicate
Sourcepub fn not_in(column: impl Into<String>, values: Vec<Value>) -> Predicate
pub fn not_in(column: impl Into<String>, values: Vec<Value>) -> Predicate
Create a NOT IN predicate
Sourcepub fn like(column: impl Into<String>, pattern: impl Into<String>) -> Predicate
pub fn like(column: impl Into<String>, pattern: impl Into<String>) -> Predicate
Create a LIKE predicate
Sourcepub fn not_like(
column: impl Into<String>,
pattern: impl Into<String>,
) -> Predicate
pub fn not_like( column: impl Into<String>, pattern: impl Into<String>, ) -> Predicate
Create a NOT LIKE predicate
Sourcepub fn is_not_null(column: impl Into<String>) -> Predicate
pub fn is_not_null(column: impl Into<String>) -> Predicate
Create an IS NOT NULL predicate
Sourcepub fn contains(column: impl Into<String>, value: Value) -> Predicate
pub fn contains(column: impl Into<String>, value: Value) -> Predicate
Create a CONTAINS predicate
Sourcepub fn starts_with(
column: impl Into<String>,
prefix: impl Into<String>,
) -> Predicate
pub fn starts_with( column: impl Into<String>, prefix: impl Into<String>, ) -> Predicate
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
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 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>
Wrap the input message
T in a tonic::Request