Skip to main content

OwnedExecutablePlan

Struct OwnedExecutablePlan 

Source
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

Source

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.

Source

pub fn reserved_bytes(&self) -> usize

Source

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.

Source

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.

Source

pub fn into_shared( self, control: &ProductionControl<'_>, ) -> Result<SharedExecutablePlan, SQLError>

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>§

Source

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.

Source

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.

Source

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.

Source

pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<MutableExecutablePlan, SQLError>

Source

pub fn visit_sources(&self, visit: &mut dyn FnMut(&SourcePlan))

Source

pub fn name(&self) -> &'static str

Source

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

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

Source§

fn as_ref(&self) -> &UnifiedPlan

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for OwnedExecutablePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for OwnedExecutablePlan

Source§

type Target = UnifiedPlan

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<Produced<UnifiedPlan>> for OwnedExecutablePlan

Source§

fn from(plan: Produced<UnifiedPlan>) -> Self

Converts to this type from the input type.
Source§

impl From<UnifiedPlan> for OwnedExecutablePlan

Source§

fn from(plan: UnifiedPlan) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.