Kagome
Polkadot Runtime Engine in C++17
kagome::storage::face::WriteBatch< K, V > Struct Template Referenceabstract

An abstraction over a storage, which can be used for batch writes. More...

#include <write_batch.hpp>

Inheritance diagram for kagome::storage::face::WriteBatch< K, V >:
Collaboration diagram for kagome::storage::face::WriteBatch< K, V >:

Public Member Functions

virtual outcome::result< void > commit ()=0
 Writes batch. More...
 
virtual void clear ()=0
 Clear batch. More...
 
- Public Member Functions inherited from kagome::storage::face::Writeable< K, V >
virtual ~Writeable ()=default
 
virtual outcome::result< void > put (const K &key, const V &value)=0
 Store value by key. More...
 
virtual outcome::result< void > put (const K &key, V &&value)=0
 
virtual outcome::result< void > remove (const K &key)=0
 Remove value by key. More...
 

Detailed Description

template<typename K, typename V>
struct kagome::storage::face::WriteBatch< K, V >

An abstraction over a storage, which can be used for batch writes.

Template Parameters
Kkey type
Vvalue type

Definition at line 19 of file write_batch.hpp.

Member Function Documentation

template<typename K, typename V>
virtual void kagome::storage::face::WriteBatch< K, V >::clear ( )
pure virtual
template<typename K, typename V>
virtual outcome::result<void> kagome::storage::face::WriteBatch< K, V >::commit ( )
pure virtual

Writes batch.

Returns
error code in case of error.

Implemented in kagome::storage::InMemoryBatch, kagome::storage::trie::TrieStorageBackendBatch, and kagome::storage::RocksDB::Batch.


The documentation for this struct was generated from the following file: