Skip to main content

ReferentialReadSnapshot

Trait ReferentialReadSnapshot 

Source
pub trait ReferentialReadSnapshot {
    // Required methods
    fn doc_ids(&self, table: &str) -> Result<Vec<DocId>, SQLError>;
    fn doc_id_page(
        &self,
        table: &str,
        after: Option<DocId>,
        limit: usize,
        control: &StorageReadControl,
    ) -> Result<BudgetedVec<DocId>, SQLError>;
    fn value_index_scan_key(
        &self,
        table: &str,
        key: &ValueIndexKey,
        predicate: &Predicate,
    ) -> Result<Option<PostingList>, SQLError>;
    fn visit_value_index_equal(
        &self,
        table: &str,
        key: &ValueIndexKey,
        value: &Value,
        visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>,
    ) -> Result<bool, SQLError>;
    fn document(
        &self,
        table: &str,
        doc_id: DocId,
    ) -> Result<Option<Document>, SQLError>;
    fn metadata(
        &self,
        table: &str,
        doc_id: DocId,
    ) -> Result<Option<DocumentMetadata>, SQLError>;
}
Expand description

Retained latest row images used only for referential checks under a fixed transaction snapshot.

Required Methods§

Source

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

Source

fn doc_id_page( &self, table: &str, after: Option<DocId>, limit: usize, control: &StorageReadControl, ) -> Result<BudgetedVec<DocId>, SQLError>

Source

fn value_index_scan_key( &self, table: &str, key: &ValueIndexKey, predicate: &Predicate, ) -> Result<Option<PostingList>, SQLError>

Probe the same retained row generation used by this snapshot’s document reads.

Source

fn visit_value_index_equal( &self, table: &str, key: &ValueIndexKey, value: &Value, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§