use crate::{plan::UnifiedPlan, SQLError, SQLParam};
pub trait PreparedPlanProvider {
fn plan_for_execution(
&self,
name: &str,
parameters: &[SQLParam],
) -> Result<Option<UnifiedPlan>, SQLError>;
}
pub struct PreparedPlanAnalysis {
pub logical_plan: std::sync::Arc<UnifiedPlan>,
pub effective_search_path: Option<crate::catalog::resolution::EffectiveSearchPath>,
pub dependencies: super::dependencies::PreparedAnalysisDependencies,
pub dependency_snapshot: Option<super::dependencies::PreparedDependencySnapshot>,
}
pub struct PreparedPlanUpdate {
pub reanalyzed: Option<PreparedPlanAnalysis>,
pub generic_plan: Option<UnifiedPlan>,
pub generic_cost: Option<f64>,
pub custom_cost: Option<f64>,
}
pub struct PreparedPlanSelection {
pub plan: UnifiedPlan,
pub update: PreparedPlanUpdate,
}