Skip to main content

SharedExecutablePlan

Struct SharedExecutablePlan 

Source
pub struct SharedExecutablePlan(/* private fields */);
Expand description

Shared immutable execution storage. Keeping the Arc private prevents unwrapping its payload while leaving the shared allocation’s reservation attached to an unboxed value.

Implementations§

Source§

impl SharedExecutablePlan

Source

pub fn strong_count(&self) -> usize

Source

pub fn ptr_eq(&self, other: &Self) -> bool

Source

pub fn reserved_bytes(&self) -> usize

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 SharedExecutablePlan

Source§

fn as_ref(&self) -> &UnifiedPlan

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

impl Clone for SharedExecutablePlan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SharedExecutablePlan

Source§

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

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

impl Deref for SharedExecutablePlan

Source§

type Target = UnifiedPlan

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl From<Arc<UnifiedPlan>> for SharedExecutablePlan

Source§

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

Converts to this type from the input type.
Source§

impl From<UnifiedPlan> for SharedExecutablePlan

Source§

fn from(plan: UnifiedPlan) -> Self

Share an ordinary input without claiming admission for allocations its constructors did not reserve.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.