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) -> UnifiedPlan
pub fn lower(statement: Statement) -> UnifiedPlan
Lower a statement using only the built-in SQL aggregate catalogue.
Sourcepub fn lower_with(
statement: Statement,
aggregates: &dyn AggregateClassifier,
) -> UnifiedPlan
pub fn lower_with( statement: Statement, aggregates: &dyn AggregateClassifier, ) -> UnifiedPlan
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.
Trait Implementations§
Source§impl Clone for UnifiedPlan
impl Clone for UnifiedPlan
Source§fn clone(&self) -> UnifiedPlan
fn clone(&self) -> UnifiedPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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<UnifiedPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnifiedPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<UnifiedPlan> for CtePlanBody
impl From<UnifiedPlan> for CtePlanBody
Source§fn from(plan: UnifiedPlan) -> CtePlanBody
fn from(plan: UnifiedPlan) -> CtePlanBody
Converts to this type from the input type.
Source§impl Serialize for UnifiedPlan
impl Serialize for UnifiedPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 more