pub trait Query {
    type Key;

    fn select(
        &mut self,
        index: &Reader,
        object: &mut dyn Reader,
        transaction_list: Vec<(CommitId, String, ObjectId)>,
        predicate: impl Fn(&Self::Key) -> QueryAction
    ); }
Expand description

Load data into memory where a predicate indicates it’s needed

This trait should be implemented on a type that also implements Strategy, and not on the field directly.

Required Associated Types

The key that the predicate will use to decide whether to pull more data into memory.

Required Methods

Load items into memory based on a predicate

The index and object readers are provided to interact with the indexes and the object pool, respectively.

transaction_list can contain any list of transactions that this loader should restore into memory.

Note that this is decidedly not a type safe way to interact with a collection, and therefore it is recommended that transaction_list is prepared and sanitized for the field that’s being restored.

Implementors