pub struct QueryPlanner { /* private fields */ }
Expand description
Query planner that generates optimized execution plans
Implementations§
Source§impl QueryPlanner
impl QueryPlanner
Sourcepub fn new(table_schemas: HashMap<String, TableSchema>) -> Self
pub fn new(table_schemas: HashMap<String, TableSchema>) -> Self
Create a new query planner with table schemas
Sourcepub fn with_config(
table_schemas: HashMap<String, TableSchema>,
config: PlannerConfig,
) -> Self
pub fn with_config( table_schemas: HashMap<String, TableSchema>, config: PlannerConfig, ) -> Self
Create a planner with custom configuration
Sourcepub fn update_table_stats(&mut self, table: String, stats: TableStatistics)
pub fn update_table_stats(&mut self, table: String, stats: TableStatistics)
Update table statistics for better cost estimation
Sourcepub fn plan(&self, statement: Statement) -> Result<ExecutionPlan>
pub fn plan(&self, statement: Statement) -> Result<ExecutionPlan>
Generate an optimized execution plan for a SQL statement
Sourcepub fn update_table_schema(&mut self, table_name: String, schema: TableSchema)
pub fn update_table_schema(&mut self, table_name: String, schema: TableSchema)
Update table schemas (called when DDL operations occur)
Sourcepub fn remove_table_schema(&mut self, table_name: &str)
pub fn remove_table_schema(&mut self, table_name: &str)
Remove table schema (called when table is dropped)
Sourcepub fn table_schemas(&self) -> &HashMap<String, TableSchema>
pub fn table_schemas(&self) -> &HashMap<String, TableSchema>
Get current table schemas
Sourcepub fn config(&self) -> &PlannerConfig
pub fn config(&self) -> &PlannerConfig
Get configuration
Sourcepub fn update_config(&mut self, config: PlannerConfig)
pub fn update_config(&mut self, config: PlannerConfig)
Update configuration
Auto Trait Implementations§
impl Freeze for QueryPlanner
impl RefUnwindSafe for QueryPlanner
impl Send for QueryPlanner
impl Sync for QueryPlanner
impl Unpin for QueryPlanner
impl UnwindSafe for QueryPlanner
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