Kagome
Polkadot Runtime Engine in C++17
|
#include <trie_storage_backend_batch.hpp>
Public Member Functions | |
TrieStorageBackendBatch (std::unique_ptr< face::WriteBatch< common::BufferView, common::Buffer >> storage_batch, common::Buffer node_prefix) | |
~TrieStorageBackendBatch () override=default | |
outcome::result< void > | commit () override |
Writes batch. More... | |
outcome::result< void > | put (const common::BufferView &key, const common::Buffer &value) override |
Store value by key. More... | |
outcome::result< void > | put (const common::BufferView &key, common::Buffer &&value) override |
outcome::result< void > | remove (const common::BufferView &key) override |
Remove value by key. More... | |
void | clear () override |
Clear batch. More... | |
Public Member Functions inherited from kagome::storage::face::Writeable< common::BufferView, common::Buffer > | |
virtual | ~Writeable ()=default |
Private Member Functions | |
common::Buffer | prefixKey (const common::BufferView &key) const |
Private Attributes | |
std::unique_ptr< face::WriteBatch< common::BufferView, common::Buffer > > | storage_batch_ |
common::Buffer | node_prefix_ |
Batch implementation for TrieStorageBackend
Definition at line 18 of file trie_storage_backend_batch.hpp.
kagome::storage::trie::TrieStorageBackendBatch::TrieStorageBackendBatch | ( | std::unique_ptr< face::WriteBatch< common::BufferView, common::Buffer >> | storage_batch, |
common::Buffer | node_prefix | ||
) |
Definition at line 10 of file trie_storage_backend_batch.cpp.
|
overridedefault |
|
overridevirtual |
Clear batch.
Implements kagome::storage::face::WriteBatch< common::BufferView, common::Buffer >.
Definition at line 23 of file trie_storage_backend_batch.cpp.
|
overridevirtual |
Writes batch.
Implements kagome::storage::face::WriteBatch< common::BufferView, common::Buffer >.
Definition at line 19 of file trie_storage_backend_batch.cpp.
|
private |
Definition at line 42 of file trie_storage_backend_batch.cpp.
|
overridevirtual |
Store value by key.
key | key |
value | value |
Implements kagome::storage::face::Writeable< common::BufferView, common::Buffer >.
Definition at line 27 of file trie_storage_backend_batch.cpp.
|
overridevirtual |
Implements kagome::storage::face::Writeable< common::BufferView, common::Buffer >.
Definition at line 32 of file trie_storage_backend_batch.cpp.
|
overridevirtual |
Remove value by key.
key | K |
Implements kagome::storage::face::Writeable< common::BufferView, common::Buffer >.
Definition at line 37 of file trie_storage_backend_batch.cpp.
|
private |
Definition at line 43 of file trie_storage_backend_batch.hpp.
|
private |
Definition at line 42 of file trie_storage_backend_batch.hpp.