pub enum Predicate {
Comparison {
left: Box<Expr>,
operator: ComparisonOperator,
right: Box<Expr>,
},
IsNull(Box<Expr>),
And(Box<Predicate>, Box<Predicate>),
Or(Box<Predicate>, Box<Predicate>),
Not(Box<Predicate>),
True,
False,
Placeholder,
}Variants§
Comparison
IsNull(Box<Expr>)
And(Box<Predicate>, Box<Predicate>)
Or(Box<Predicate>, Box<Predicate>)
Not(Box<Predicate>)
True
False
Placeholder
Implementations§
Source§impl Predicate
impl Predicate
Sourcepub fn walk<T, F>(&self, accumulator: T, visitor: &mut F) -> T
pub fn walk<T, F>(&self, accumulator: T, visitor: &mut F) -> T
Recursively walk a predicate tree and accumulate results using a closure
Sourcepub fn assume_null(&self, columns: &[String]) -> Self
pub fn assume_null(&self, columns: &[String]) -> Self
Clones the predicate tree and evaluates comparisons involving missing columns as if they were NULL
Sourcepub fn populate<I, V, E>(self, values: I) -> Result<Predicate, ParseError>
pub fn populate<I, V, E>(self, values: I) -> Result<Predicate, ParseError>
Populate placeholders in the predicate with actual values
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Predicate
impl<'de> Deserialize<'de> for Predicate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Predicate
Auto Trait Implementations§
impl Freeze for Predicate
impl RefUnwindSafe for Predicate
impl Send for Predicate
impl Sync for Predicate
impl Unpin 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