pub struct QueryPlanner { /* private fields */ }Expand description
Simple rule-based query planner
Implementations§
Source§impl QueryPlanner
impl QueryPlanner
Sourcepub fn new(table_schemas: HashMap<String, Rc<TableSchema>>) -> Self
pub fn new(table_schemas: HashMap<String, Rc<TableSchema>>) -> Self
Create a new query planner with table schemas
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: Rc<TableSchema>,
)
pub fn update_table_schema( &mut self, table_name: String, schema: Rc<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, Rc<TableSchema>>
pub fn table_schemas(&self) -> &HashMap<String, Rc<TableSchema>>
Get current table schemas
Auto Trait Implementations§
impl !Send for QueryPlanner
impl !Sync for QueryPlanner
impl Freeze for QueryPlanner
impl RefUnwindSafe for QueryPlanner
impl Unpin for QueryPlanner
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.