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 reanalyzed: Option<PreparedPlanAnalysis>,
29 pub generic_plan: Option<UnifiedPlan>,
30 pub generic_cost: Option<f64>,
31 pub custom_cost: Option<f64>,
32}