uqa_sql/prepared/
planning.rs1use crate::{plan::UnifiedPlan, SQLError, SQLParam};
10
11pub trait PreparedPlanProvider {
12 fn plan_for_execution(
13 &self,
14 name: &str,
15 parameters: &[SQLParam],
16 ) -> Result<Option<UnifiedPlan>, SQLError>;
17}
18
19pub struct PreparedPlanAnalysis {
21 pub logical_plan: std::sync::Arc<UnifiedPlan>,
22 pub effective_search_path: Option<crate::catalog::resolution::EffectiveSearchPath>,
23 pub dependencies: super::dependencies::PreparedAnalysisDependencies,
24 pub dependency_snapshot: Option<super::dependencies::PreparedDependencySnapshot>,
25}
26
27pub struct PreparedPlanUpdate {
28 pub composite_inputs: super::composites::CompositeInputs,
29 pub reanalyzed: Option<PreparedPlanAnalysis>,
30 pub generic_plan: Option<UnifiedPlan>,
31 pub generic_cost: Option<f64>,
32 pub custom_cost: Option<f64>,
33}
34
35pub struct PreparedPlanSelection {
38 pub plan: UnifiedPlan,
39 pub update: PreparedPlanUpdate,
40}