pub trait Query {
type Key;
fn select(
&mut self,
pool: Pool<AEADReader>,
transaction_list: Vec<(CommitId, String, Stream)>,
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
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.