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§
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>
Provided Methods§
Sourcefn index_holds_fields(
&self,
name: &str,
table: &Arc<dyn TableRead>,
fields: &[String],
) -> Result<bool, SQLError>
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".