Skip to main content

QueryIndexRead

Trait QueryIndexRead 

Source
pub trait QueryIndexRead: Sync {
    // Required methods
    fn value_index_scan(
        &self,
        table: &str,
        field: &str,
        predicate: &Predicate,
    ) -> Result<Option<PostingList>, SQLError>;
    fn visit_value_index(
        &self,
        table: &str,
        field: &str,
        predicate: &Predicate,
        visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>,
    ) -> Result<bool, SQLError>;
    fn command_overlay_changes(
        &self,
        table: &str,
    ) -> Result<Option<DocumentChanges>, SQLError>;
    fn exact_command_matches(
        &self,
        table: &str,
        field: &str,
        value: &Value,
    ) -> Result<CommandIndexProbe, SQLError>;
    fn visit_exact_command_matches(
        &self,
        table: &str,
        field: &str,
        value: &Value,
        visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>,
    ) -> Result<DocumentChanges, SQLError>;
}
Expand description

All inputs refer to the query’s selected relation generation and original read allowance.

Required Methods§

Source

fn value_index_scan( &self, table: &str, field: &str, predicate: &Predicate, ) -> Result<Option<PostingList>, SQLError>

Probe stored values and record the original serializable predicate observation.

Source

fn visit_value_index( &self, table: &str, field: &str, predicate: &Predicate, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<bool, SQLError>

Visit support without collecting a posting list, retaining the same selected snapshot and predicate observation. False means unsupported and must not follow any callback.

Source

fn command_overlay_changes( &self, table: &str, ) -> Result<Option<DocumentChanges>, SQLError>

Source

fn exact_command_matches( &self, table: &str, field: &str, value: &Value, ) -> Result<CommandIndexProbe, SQLError>

Capture command-only masks together with cached matches from the same frame stack.

Source

fn visit_exact_command_matches( &self, table: &str, field: &str, value: &Value, visit: &mut dyn FnMut(DocId) -> Result<(), SQLError>, ) -> Result<DocumentChanges, SQLError>

Capture every cached command match before returning its exact frame mask. The callback captures identities and must not reenter the engine.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§