pub struct OwnedExecutablePlan { /* private fields */ }Expand description
An executable and the reservations transferred by its allocation owners. Moving an existing input into this owner performs no allocation and does not retroactively charge that input. Native producers must admit their new allocations before transferring them. The tree is read-only after publication; preparation that constructs additional storage must retain its output reservations too.
Implementations§
Source§impl OwnedExecutablePlan
impl OwnedExecutablePlan
Sourcepub fn from_parts(
plan: UnifiedPlan,
memory: impl Into<ExecutableMemory>,
) -> Self
pub fn from_parts( plan: UnifiedPlan, memory: impl Into<ExecutableMemory>, ) -> Self
Transfer existing storage and the reservations already acquired by its constructors. This is an ownership transfer, not an admission operation.
pub fn reserved_bytes(&self) -> usize
Sourcepub fn into_parts(self) -> (UnifiedPlan, ExecutableMemory)
pub fn into_parts(self) -> (UnifiedPlan, ExecutableMemory)
Transfer the tree and its leases together to a specialized owning operation. That operation must keep them alive until their corresponding storage is destroyed or transferred; it must admit any new allocation before construction.
Sourcepub fn into_query(self) -> Result<OwnedQueryPlan, Self>
pub fn into_query(self) -> Result<OwnedQueryPlan, Self>
Project a query without unboxing, copying or changing any reservation. A command is returned intact to its caller.
Admit only the new shared payload; all existing tree allocations retain their original leases. Cloning the returned handle does not allocate or copy the executable.
Methods from Deref<Target = UnifiedPlan>§
Sourcepub fn clone_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, SQLError>
pub fn clone_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, SQLError>
Copy complete analyzed syntax, including utility commands, admitting each owned destination before construction. Transient bindings and shared immutable input owners preserve their original identities.
Sourcepub fn clone_executable_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, SQLError>
pub fn clone_executable_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, SQLError>
Copy a query or INSERT/UPDATE/DELETE/MERGE executable. Utility commands have separate preparation and lifetime owners and are rejected by this executable-only operation.
Sourcepub fn planning_memory(
&self,
control: &ProductionControl<'_>,
) -> Result<ExplainPlanningMemory, SQLError>
pub fn planning_memory( &self, control: &ProductionControl<'_>, ) -> Result<ExplainPlanningMemory, SQLError>
Observe initialized bytes and exposed allocation capacity before execution. Shared literal owners are counted once without decoding. Immutable analysis/catalog descriptors, opaque dependency storage and allocator bookkeeping remain outside the executable’s storage. This neither evaluates expressions nor reserves the already-produced plan again.
pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<MutableExecutablePlan, SQLError>
pub fn visit_sources(&self, visit: &mut dyn FnMut(&SourcePlan))
pub fn name(&self) -> &'static str
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.
Sourcepub fn try_visit_scalar_expressions<'a, E>(
&'a self,
visit: &mut dyn FnMut(&'a ScalarExpr) -> Result<(), E>,
) -> Result<(), E>
pub fn try_visit_scalar_expressions<'a, E>( &'a self, visit: &mut dyn FnMut(&'a ScalarExpr) -> Result<(), E>, ) -> Result<(), E>
Stop at the first callback error, without copying syntax or visiting later inputs.
Trait Implementations§
Source§impl AsRef<UnifiedPlan> for OwnedExecutablePlan
impl AsRef<UnifiedPlan> for OwnedExecutablePlan
Source§fn as_ref(&self) -> &UnifiedPlan
fn as_ref(&self) -> &UnifiedPlan
Source§impl Debug for OwnedExecutablePlan
impl Debug for OwnedExecutablePlan
Source§impl Deref for OwnedExecutablePlan
impl Deref for OwnedExecutablePlan
Source§impl From<Produced<UnifiedPlan>> for OwnedExecutablePlan
impl From<Produced<UnifiedPlan>> for OwnedExecutablePlan
Source§fn from(plan: Produced<UnifiedPlan>) -> Self
fn from(plan: Produced<UnifiedPlan>) -> Self
Source§impl From<UnifiedPlan> for OwnedExecutablePlan
impl From<UnifiedPlan> for OwnedExecutablePlan
Source§fn from(plan: UnifiedPlan) -> Self
fn from(plan: UnifiedPlan) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedExecutablePlan
impl !UnwindSafe for OwnedExecutablePlan
impl Freeze for OwnedExecutablePlan
impl Send for OwnedExecutablePlan
impl Sync for OwnedExecutablePlan
impl Unpin for OwnedExecutablePlan
impl UnsafeUnpin for OwnedExecutablePlan
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
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