Skip to main content

QueryPlanExt

Trait QueryPlanExt 

Source
pub trait QueryPlanExt {
    // Required methods
    fn into_subquery(self) -> PredicateValue;
    fn as_subquery(&self) -> PredicateValue;
}
Expand description

Extension methods on QueryPlan that simplify common composition patterns. Implemented as a trait so the [ir] module stays free of compile-flavoured concerns.

Required Methods§

Source

fn into_subquery(self) -> PredicateValue

Wraps the plan’s root as a PredicateValue::Subquery suitable for embedding inside a relation predicate (e.g. Predicate::Callers).

Consumes the plan to avoid a clone — callers needing both the plan and the subquery should .clone() first.

Source

fn as_subquery(&self) -> PredicateValue

Borrowing variant of Self::into_subquery that clones the plan’s root rather than consuming it.

Implementors§