pub struct OwnedQueryPlan { /* private fields */ }Expand description
A relational executable projected from its statement owner. Retaining the original root box avoids copying its payload or releasing a charged box while its reservation is still attached to the query.
Implementations§
Source§impl OwnedQueryPlan
impl OwnedQueryPlan
Sourcepub fn from_query(
query: QueryPlan,
control: &ProductionControl<'_>,
) -> Result<Self, SQLError>
pub fn from_query( query: QueryPlan, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Admit the enclosing box for an existing query without retroactively charging its payload.
Sourcepub fn from_produced(
query: Produced<QueryPlan>,
control: &ProductionControl<'_>,
) -> Result<Self, SQLError>
pub fn from_produced( query: Produced<QueryPlan>, control: &ProductionControl<'_>, ) -> Result<Self, SQLError>
Preserve an admitted query body and admit its enclosing box before allocating it.
Sourcepub fn from_parts(
query: Box<QueryPlan>,
memory: impl Into<ExecutableMemory>,
) -> Self
pub fn from_parts( query: Box<QueryPlan>, memory: impl Into<ExecutableMemory>, ) -> Self
Transfer an existing root box together with its constructor reservations.
pub fn reserved_bytes(&self) -> usize
Sourcepub fn into_parts(self) -> (Box<QueryPlan>, ExecutableMemory)
pub fn into_parts(self) -> (Box<QueryPlan>, ExecutableMemory)
Specialized query preparation must keep this pair together and admit its additional source attachments before construction.
Sourcepub fn into_unboxed(self) -> (QueryPlan, ExecutableMemory)
pub fn into_unboxed(self) -> (QueryPlan, ExecutableMemory)
Move the query into an enclosing owner whose representation has no root box. Release that box’s own lease only after freeing it; the caller must retain the returned storage leases with the query.
pub fn into_executable(self) -> OwnedExecutablePlan
Methods from Deref<Target = QueryPlan>§
Sourcepub fn copy_with_set_inputs(
&self,
left: OwnedQueryPlan,
right: OwnedQueryPlan,
control: &ProductionControl<'_>,
) -> Result<OwnedQueryPlan, SQLError>
pub fn copy_with_set_inputs( &self, left: OwnedQueryPlan, right: OwnedQueryPlan, control: &ProductionControl<'_>, ) -> Result<OwnedQueryPlan, SQLError>
Retain a set operation’s declarations and clauses while transferring both independently optimized query inputs.
Sourcepub fn copy_primary_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, SQLError>
pub fn copy_primary_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, SQLError>
Copy the primary query after its WITH definitions have been installed in the lexical scope. Excluded declarations are never allocated; all primary metadata and nested query scopes retain their meaning.
Sourcepub fn set_ordering_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<QueryBlockPlan>, SQLError>
pub fn set_ordering_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<QueryBlockPlan>, SQLError>
Produce the ordering/slicing block of a set operation without copying either operand. Scalar-query slots remain in the same order as their original expressions.
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 a relational executable and its query/mutation CTEs, admitting destination capacities and owned payloads before allocation. Immutable analysis descriptors and retained row/literal identities remain shared.
Sourcepub fn copy_for_rewrite(
&self,
control: &ProductionControl<'_>,
) -> Result<MutableQueryPlan, SQLError>
pub fn copy_for_rewrite( &self, control: &ProductionControl<'_>, ) -> Result<MutableQueryPlan, SQLError>
Copy a complete query while keeping mutable constructor ownership separate. Every destination and ownership-record buffer is admitted before allocation; published immutable schemas retain their original shared owners.
pub fn visit_sources(&self, visit: &mut dyn FnMut(&SourcePlan))
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 query owns, each root once, including those of its CTEs, relational sources and scalar subqueries.
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<QueryPlan> for OwnedQueryPlan
impl AsRef<QueryPlan> for OwnedQueryPlan
Source§impl Debug for OwnedQueryPlan
impl Debug for OwnedQueryPlan
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedQueryPlan
impl !UnwindSafe for OwnedQueryPlan
impl Freeze for OwnedQueryPlan
impl Send for OwnedQueryPlan
impl Sync for OwnedQueryPlan
impl Unpin for OwnedQueryPlan
impl UnsafeUnpin for OwnedQueryPlan
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