pub struct IndexManager { /* private fields */ }Expand description
In-memory physical index registry, independent of catalog persistence.
Implementations§
Source§impl IndexManager
impl IndexManager
pub fn new() -> Self
Sourcepub fn create_index(
&self,
index_def: IndexDef,
) -> Result<(), StorageBackendError>
pub fn create_index( &self, index_def: IndexDef, ) -> Result<(), StorageBackendError>
Build a physical index and register the definition under
index_def.name. Returns an error if an index with the same
name is already registered.
pub fn drop_index(&self, name: &str) -> Result<bool, StorageBackendError>
pub fn drop_indexes_for_table( &self, table_name: &str, ) -> Result<(), StorageBackendError>
pub fn find_covering_index_name( &self, table_name: &str, column: &str, predicate: &Predicate, ) -> Option<String>
Sourcepub fn find_covering_index_with_cost(
&self,
table_name: &str,
column: &str,
predicate: &Predicate,
) -> Option<(String, f64)>
pub fn find_covering_index_with_cost( &self, table_name: &str, column: &str, predicate: &Predicate, ) -> Option<(String, f64)>
Like Self::find_covering_index_name but returns the chosen
index’s name together with its scan_cost(predicate) so the caller can
require scan_cost < full_scan_cost before committing to the rewrite.
pub fn has_index(&self, name: &str) -> bool
pub fn index_count(&self) -> usize
Trait Implementations§
Source§impl Default for IndexManager
impl Default for IndexManager
Source§fn default() -> IndexManager
fn default() -> IndexManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for IndexManager
impl !RefUnwindSafe for IndexManager
impl !UnwindSafe for IndexManager
impl Send for IndexManager
impl Sync for IndexManager
impl Unpin for IndexManager
impl UnsafeUnpin for IndexManager
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