Trait holochain_state::query::Stores

source ·
pub trait Stores<Q: Query> {
    type O: StoresIter<Q::Item>;

    // Required method
    fn get_initial_data(&self, query: Q) -> StateQueryResult<Self::O>;
}
Expand description

Represents the data sources which are needed to perform a Query. From these sources, we need:

  • a collection of Data needed by the query (Q::Data)
  • the ability to fetch an Entry during the Render phase of the query.

Required Associated Types§

Required Methods§

source

fn get_initial_data(&self, query: Q) -> StateQueryResult<Self::O>

Gets the raw initial data from the database, needed to begin the query.

Implementors§

source§

impl<'borrow, 'txn, Q> Stores<Q> for DbScratch<'borrow, 'txn>
where Q: Query<Item = Judged<SignedActionHashed>>,

§

type O = DbScratchIter<'borrow, Q>

source§

impl<'stmt, Q: Query> Stores<Q> for Txn<'stmt, '_>

§

type O = QueryStmt<'stmt, Q>

source§

impl<'stmt, Q: Query> Stores<Q> for Txns<'stmt, '_>

§

type O = QueryStmts<'stmt, Q>

source§

impl<Q> Stores<Q> for Scratch
where Q: Query<Item = Judged<SignedActionHashed>>,