pub struct SchemaLayoutCache { /* private fields */ }Expand description
Cache for SchemaLayout instances.
- Full-table queries: cached by table name
- Projection queries: created fresh (column combinations are too varied to cache effectively)
Implementations§
Source§impl SchemaLayoutCache
impl SchemaLayoutCache
Sourcepub fn get_or_create_full(
&mut self,
table_name: &str,
schema: &Table,
) -> &SchemaLayout
pub fn get_or_create_full( &mut self, table_name: &str, schema: &Table, ) -> &SchemaLayout
Get or create a SchemaLayout for a full-table query. The layout is cached and reused for subsequent queries on the same table.
Sourcepub fn create_projection(
schema: &Table,
column_names: &[String],
) -> SchemaLayout
pub fn create_projection( schema: &Table, column_names: &[String], ) -> SchemaLayout
Create a SchemaLayout for a projection query. Projection layouts are not cached since column combinations vary too much.
Sourcepub fn invalidate(&mut self, table_name: &str)
pub fn invalidate(&mut self, table_name: &str)
Invalidate cache for a specific table (call when schema changes)
Trait Implementations§
Source§impl Default for SchemaLayoutCache
impl Default for SchemaLayoutCache
Source§fn default() -> SchemaLayoutCache
fn default() -> SchemaLayoutCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SchemaLayoutCache
impl RefUnwindSafe for SchemaLayoutCache
impl Send for SchemaLayoutCache
impl Sync for SchemaLayoutCache
impl Unpin for SchemaLayoutCache
impl UnwindSafe for SchemaLayoutCache
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