pub struct Predicate { /* private fields */ }Expand description
Logical predicate shared across adapters and Tonbo’s core.
Implementations§
Source§impl Predicate
Convenience constructors mirroring DataFusion-style expression helpers.
impl Predicate
Convenience constructors mirroring DataFusion-style expression helpers.
Sourcepub fn compare<L, R>(left: L, op: ComparisonOp, right: R) -> Self
pub fn compare<L, R>(left: L, op: ComparisonOp, right: R) -> Self
Create a comparison predicate.
Sourcepub fn not_in_list<O, I>(expr: O, list: I) -> Self
pub fn not_in_list<O, I>(expr: O, list: I) -> Self
NOT IN list predicate.
Sourcepub fn is_not_null<O>(expr: O) -> Self
pub fn is_not_null<O>(expr: O) -> Self
IS NOT NULL predicate.
Source§impl Predicate
impl Predicate
Sourcepub fn kind(&self) -> &PredicateNode
pub fn kind(&self) -> &PredicateNode
Returns a reference to the underlying node.
Sourcepub fn and<I>(clauses: I) -> Selfwhere
I: IntoIterator<Item = Predicate>,
pub fn and<I>(clauses: I) -> Selfwhere
I: IntoIterator<Item = Predicate>,
Sourcepub fn or<I>(clauses: I) -> Selfwhere
I: IntoIterator<Item = Predicate>,
pub fn or<I>(clauses: I) -> Selfwhere
I: IntoIterator<Item = Predicate>,
Sourcepub fn conjunction(predicates: Vec<Predicate>) -> Option<Predicate>
pub fn conjunction(predicates: Vec<Predicate>) -> Option<Predicate>
Builds a conjunction from the supplied predicates, if any are provided.
Sourcepub fn disjunction(predicates: Vec<Predicate>) -> Option<Predicate>
pub fn disjunction(predicates: Vec<Predicate>) -> Option<Predicate>
Builds a disjunction from the supplied predicates, if any.
Sourcepub fn from_node(node: PredicateNode) -> Self
pub fn from_node(node: PredicateNode) -> Self
Builds a predicate directly from a single node.
Sourcepub fn accept<V>(
&self,
visitor: &mut V,
) -> Result<VisitOutcome<V::Value>, V::Error>where
V: PredicateVisitor + ?Sized,
pub fn accept<V>(
&self,
visitor: &mut V,
) -> Result<VisitOutcome<V::Value>, V::Error>where
V: PredicateVisitor + ?Sized,
Accepts a visitor that walks the predicate tree bottom-up.
Trait Implementations§
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 UnsafeUnpin for Predicate
impl UnwindSafe for Predicate
Blanket Implementations§
impl<T> Allocation for T
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