pub trait DbCommit {
    // Required methods
    fn commit<'async_trait>(
        self: Box<Self>,
        docs: HashMap<Hash, DocChange>,
        entries: HashMap<EntryRef, EntryChange>
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), CommitErrors>, Box<DbError>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn schema_get(
        &self,
        schema: &Hash
    ) -> Result<Option<Arc<Schema>>, Box<DbError>>;
    fn doc_get(&self, doc: &Hash) -> Result<Option<Arc<Document>>, Box<DbError>>;
}
Expand description

A connection to the database through which a transaction can be committed.

Required Methods§

source

fn commit<'async_trait>( self: Box<Self>, docs: HashMap<Hash, DocChange>, entries: HashMap<EntryRef, EntryChange> ) -> Pin<Box<dyn Future<Output = Result<Result<(), CommitErrors>, Box<DbError>>> + Send + 'async_trait>>where Self: 'async_trait,

source

fn schema_get(&self, schema: &Hash) -> Result<Option<Arc<Schema>>, Box<DbError>>

Get a schema in the database

source

fn doc_get(&self, doc: &Hash) -> Result<Option<Arc<Document>>, Box<DbError>>

Get a document directly from the database

Implementors§