pub struct StatementPlanningContext<'a> {
pub analysis: StatementAnalysisContext<'a>,
pub aggregates: &'a dyn AggregateClassifier,
pub optimization: &'a dyn StatementOptimizationContexts,
pub constant_evaluator: ConstantEvaluator,
}Fields§
§analysis: StatementAnalysisContext<'a>§aggregates: &'a dyn AggregateClassifier§optimization: &'a dyn StatementOptimizationContexts§constant_evaluator: ConstantEvaluatorTrait Implementations§
Source§impl ExecutablePlanOptimizer for StatementPlanningContext<'_>
impl ExecutablePlanOptimizer for StatementPlanningContext<'_>
Source§fn plan_with_cached_analysis(
&self,
plan: UnifiedPlan,
params: &[SQLParam],
cached: Option<Arc<AnalyzedStatement>>,
) -> Result<(UnifiedPlan, Option<Arc<AnalyzedStatement>>), SQLError>
fn plan_with_cached_analysis( &self, plan: UnifiedPlan, params: &[SQLParam], cached: Option<Arc<AnalyzedStatement>>, ) -> Result<(UnifiedPlan, Option<Arc<AnalyzedStatement>>), SQLError>
Reuse analysis only after the caller validates its catalog/scope in the selected snapshot. Optimization still runs for this invocation. The default retains full analysis for implementations without this capability.
Source§fn plan_for_statement_cache(
&self,
plan: UnifiedPlan,
params: &[SQLParam],
) -> Result<(UnifiedPlan, bool), SQLError>
fn plan_for_statement_cache( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<(UnifiedPlan, bool), SQLError>
Return an executable and whether its analysis inputs permit reuse across
ordinary messages. Planners without that evidence must analyze again.
fn plan_for_execution( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<UnifiedPlan, SQLError>
Source§fn plan_with_result(
&self,
plan: UnifiedPlan,
params: &[SQLParam],
) -> Result<(UnifiedPlan, AnalyzedResult), SQLError>
fn plan_with_result( &self, plan: UnifiedPlan, params: &[SQLParam], ) -> Result<(UnifiedPlan, AnalyzedResult), SQLError>
Analyze and optimize a logical plan, and return what its analysis derives about its result.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StatementPlanningContext<'a>
impl<'a> !Send for StatementPlanningContext<'a>
impl<'a> !Sync for StatementPlanningContext<'a>
impl<'a> !UnwindSafe for StatementPlanningContext<'a>
impl<'a> Freeze for StatementPlanningContext<'a>
impl<'a> Unpin for StatementPlanningContext<'a>
impl<'a> UnsafeUnpin for StatementPlanningContext<'a>
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
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