Skip to main content

QueryDocumentRead

Trait QueryDocumentRead 

Source
pub trait QueryDocumentRead: Sync {
    // Required methods
    fn document_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>;
    fn document(
        &self,
        table: &str,
        doc_id: DocId,
    ) -> Result<Option<Document>, SQLError>;
    fn document_fields(
        &self,
        table: &str,
        ids: &[DocId],
        fields: &[&str],
    ) -> Result<BTreeMap<DocId, Vec<Value>>, SQLError>;
    fn column_definitions(
        &self,
        table: &str,
    ) -> Result<Option<Vec<ColumnDef>>, String>;
    fn command_overlay_holds(&self, table: &str) -> Result<bool, SQLError>;
}

Required Methods§

Source

fn document_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>

Source

fn document( &self, table: &str, doc_id: DocId, ) -> Result<Option<Document>, SQLError>

Source

fn document_fields( &self, table: &str, ids: &[DocId], fields: &[&str], ) -> Result<BTreeMap<DocId, Vec<Value>>, SQLError>

Source

fn column_definitions( &self, table: &str, ) -> Result<Option<Vec<ColumnDef>>, String>

Source

fn command_overlay_holds(&self, table: &str) -> Result<bool, SQLError>

Whether a read of table merges changes from the command overlay that the table’s storage view does not show. A read of a table for which this is false sees exactly its storage view.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§