pub struct ExecutionContext { /* private fields */ }Expand description
Execution context providing access to table metadata and statistics.
Implementations§
Source§impl ExecutionContext
impl ExecutionContext
Sourcepub fn register_table(&mut self, table: impl Into<String>, stats: TableStats)
pub fn register_table(&mut self, table: impl Into<String>, stats: TableStats)
Registers table statistics.
Sourcepub fn get_stats(&self, table: &str) -> Option<&TableStats>
pub fn get_stats(&self, table: &str) -> Option<&TableStats>
Gets statistics for a table.
Sourcepub fn has_index(&self, table: &str, columns: &[&str]) -> bool
pub fn has_index(&self, table: &str, columns: &[&str]) -> bool
Checks if a table has an index on the given columns.
Sourcepub fn find_index(&self, table: &str, columns: &[&str]) -> Option<&IndexInfo>
pub fn find_index(&self, table: &str, columns: &[&str]) -> Option<&IndexInfo>
Finds an index for the given columns.
Sourcepub fn find_gin_index(&self, table: &str, column: &str) -> Option<&IndexInfo>
pub fn find_gin_index(&self, table: &str, column: &str) -> Option<&IndexInfo>
Finds a GIN index for the given column.
Sourcepub fn find_primary_index(&self, table: &str) -> Option<&IndexInfo>
pub fn find_primary_index(&self, table: &str) -> Option<&IndexInfo>
Finds the primary key index (unique BTree index) for a table. Returns the first unique BTree index found, which is typically the primary key.
Trait Implementations§
Source§impl Clone for ExecutionContext
impl Clone for ExecutionContext
Source§fn clone(&self) -> ExecutionContext
fn clone(&self) -> ExecutionContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionContext
impl Debug for ExecutionContext
Source§impl Default for ExecutionContext
impl Default for ExecutionContext
Source§fn default() -> ExecutionContext
fn default() -> ExecutionContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
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