6 #ifndef KAGOME_STORAGE_TRIE_IMPL_TRIE_STORAGE_BACKEND_BATCH 7 #define KAGOME_STORAGE_TRIE_IMPL_TRIE_STORAGE_BACKEND_BATCH 27 outcome::result<void>
commit()
override;
36 void clear()
override;
41 std::unique_ptr<face::WriteBatch<common::BufferView, common::Buffer>>
48 #endif // KAGOME_STORAGE_TRIE_IMPL_TRIE_STORAGE_BACKEND_BATCH Class represents arbitrary (including empty) byte buffer.
An abstraction over a storage, which can be used for batch writes.
void clear() override
Clear batch.
TrieStorageBackendBatch(std::unique_ptr< face::WriteBatch< common::BufferView, common::Buffer >> storage_batch, common::Buffer node_prefix)
outcome::result< void > commit() override
Writes batch.
outcome::result< void > put(const common::BufferView &key, const common::Buffer &value) override
Store value by key.
common::Buffer prefixKey(const common::BufferView &key) const
~TrieStorageBackendBatch() override=default
std::unique_ptr< face::WriteBatch< common::BufferView, common::Buffer > > storage_batch_
common::Buffer node_prefix_