pub enum UnifiedPlan {
Query(Box<QueryPlan>),
Command(Box<CommandPlan>),
}Expand description
One fully lowered SQL statement.
There is deliberately no Legacy, Opaque, or raw-Statement variant:
adding a SQL statement kind must update the exhaustive lowerer and the
physical driver.
Variants§
Implementations§
Source§impl UnifiedPlan
impl UnifiedPlan
Sourcepub fn lower(statement: Statement) -> Self
pub fn lower(statement: Statement) -> Self
Lower a statement using only the built-in SQL aggregate catalogue.
Sourcepub fn lower_with(
statement: Statement,
aggregates: &dyn AggregateClassifier,
) -> Self
pub fn lower_with( statement: Statement, aggregates: &dyn AggregateClassifier, ) -> Self
Lower a statement with engine-local aggregate classification.
pub fn name(&self) -> &'static str
Sourcepub fn rewrite_scalar_expressions(
&mut self,
rewrite: &mut dyn FnMut(&mut ScalarExpr),
)
pub fn rewrite_scalar_expressions( &mut self, rewrite: &mut dyn FnMut(&mut ScalarExpr), )
Rewrite every physical scalar slot owned by this plan, including CTEs, scalar subqueries, mutation sources, prepared/explained bodies, and routine-call arguments. This is the plan-native binding hook used by SQL-language routines; callers never need to reconstruct an AST to specialize a stored plan.
Source§impl UnifiedPlan
impl UnifiedPlan
Sourcepub fn visit_scalar_expressions(&self, visit: &mut dyn FnMut(&ScalarExpr))
pub fn visit_scalar_expressions(&self, visit: &mut dyn FnMut(&ScalarExpr))
Visit every scalar expression this plan owns, each root once, including those of its CTEs, relational sources, scalar subqueries and command inputs. The nested nodes of a root are reached through ScalarExpr::visit.
Source§impl UnifiedPlan
impl UnifiedPlan
Sourcepub fn normalize_window_definitions(&mut self) -> Result<(), SQLError>
pub fn normalize_window_definitions(&mut self) -> Result<(), SQLError>
Refresh execution copies after input constants or stored identities change. Call only after identity-based input replacement has completed.
Trait Implementations§
Source§impl Clone for UnifiedPlan
impl Clone for UnifiedPlan
Source§impl Debug for UnifiedPlan
impl Debug for UnifiedPlan
Source§impl<'de> Deserialize<'de> for UnifiedPlan
impl<'de> Deserialize<'de> for UnifiedPlan
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>,
Source§impl From<UnifiedPlan> for CtePlanBody
impl From<UnifiedPlan> for CtePlanBody
Source§fn from(plan: UnifiedPlan) -> Self
fn from(plan: UnifiedPlan) -> Self
Auto Trait Implementations§
impl Freeze for UnifiedPlan
impl RefUnwindSafe for UnifiedPlan
impl Send for UnifiedPlan
impl Sync for UnifiedPlan
impl Unpin for UnifiedPlan
impl UnsafeUnpin for UnifiedPlan
impl UnwindSafe for UnifiedPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 more