Skip to main content

QueryTableAccess

Trait QueryTableAccess 

Source
pub trait QueryTableAccess: QueryIndexRead {
    // Required methods
    fn index_read_control(&self) -> Result<StorageReadControl, SQLError>;
    fn serializable_read(
        &self,
        name: &str,
    ) -> Result<Option<SerializableRelationRead>, SQLError>;
    fn table(&self, name: &str) -> Result<Arc<dyn TableRead>, SQLError>;
    fn table_row_estimate(&self, name: &str) -> Result<u64, SQLError>;

    // Provided method
    fn index_holds_fields(
        &self,
        name: &str,
        table: &Arc<dyn TableRead>,
        fields: &[String],
    ) -> Result<bool, SQLError> { ... }
}
Expand description

The chosen transaction snapshot supplies a table generation and the command’s row overlay separately.

Required Methods§

Source

fn index_read_control(&self) -> Result<StorageReadControl, SQLError>

Source

fn serializable_read( &self, name: &str, ) -> Result<Option<SerializableRelationRead>, SQLError>

Source

fn table(&self, name: &str) -> Result<Arc<dyn TableRead>, SQLError>

Source

fn table_row_estimate(&self, name: &str) -> Result<u64, SQLError>

An estimate of the rows a read of the table sees, which costs no work in the number of changes it merges; scans size their output by it.

Provided Methods§

Source

fn index_holds_fields( &self, name: &str, table: &Arc<dyn TableRead>, fields: &[String], ) -> Result<bool, SQLError>

Whether the indexes of table, the handle Self::table returned for name, hold fields for every row, loading or building what the catalog provides. An index-only read then projects those fields without reading a document.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§