Kagome
Polkadot Runtime Engine in C++17
|
#include <trie_batches.hpp>
Public Types | |
using | Cursor = face::Iterable< Buffer, common::BufferConstRef, BufferView >::Cursor |
Public Types inherited from kagome::storage::face::ReadableMap< BufferView, Buffer > | |
using | Key = BufferView |
using | Value = Buffer |
using | ValueView = std::reference_wrapper< Buffer > |
using | ConstValueView = std::reference_wrapper< const Buffer > |
Public Types inherited from kagome::storage::face::ReadableBase< BufferView > | |
using | Key = BufferView |
Public Types inherited from kagome::storage::face::Iterable< Buffer, common::BufferConstRef, BufferView > | |
using | Cursor = MapCursor< Buffer, common::BufferConstRef, BufferView > |
Public Member Functions | |
~TrieBatch () override=default | |
std::unique_ptr< Cursor > | cursor () final |
Returns new key-value iterator. More... | |
virtual std::unique_ptr< PolkadotTrieCursor > | trieCursor ()=0 |
virtual outcome::result< std::tuple< bool, uint32_t > > | clearPrefix (const BufferView &prefix, std::optional< uint64_t > limit=std::nullopt)=0 |
Public Member Functions inherited from kagome::storage::face::ReadableMap< BufferView, Buffer > | |
virtual | ~ReadableMap ()=default |
virtual outcome::result< ConstValueView > | get (const Key &key) const =0 |
Get value by key. More... | |
virtual outcome::result< std::optional< ConstValueView > > | tryGet (const Key &key) const =0 |
Get value by key. More... | |
Public Member Functions inherited from kagome::storage::face::ReadableBase< BufferView > | |
virtual | ~ReadableBase ()=default |
virtual outcome::result< bool > | contains (const Key &key) const =0 |
Checks if given key-value binding exists in the storage. More... | |
virtual bool | empty () const =0 |
Returns true if the storage is empty. More... | |
Public Member Functions inherited from kagome::storage::face::Writeable< BufferView, Buffer > | |
virtual | ~Writeable ()=default |
virtual outcome::result< void > | put (const BufferView &key, const Buffer &value)=0 |
Store value by key. More... | |
virtual outcome::result< void > | put (const BufferView &key, Buffer &&value)=0 |
virtual outcome::result< void > | remove (const BufferView &key)=0 |
Remove value by key. More... | |
Public Member Functions inherited from kagome::storage::face::Iterable< Buffer, common::BufferConstRef, BufferView > | |
virtual | ~Iterable ()=default |
Definition at line 15 of file trie_batches.hpp.
using kagome::storage::trie::TrieBatch::Cursor = face::Iterable<Buffer, common::BufferConstRef, BufferView>::Cursor |
Definition at line 23 of file trie_batches.hpp.
|
overridedefault |
|
pure virtual |
Remove all trie entries which key begins with the supplied prefix
Implemented in kagome::storage::trie::TopperTrieBatchImpl, kagome::storage::trie::PersistentTrieBatchImpl, and kagome::storage::trie::EphemeralTrieBatchImpl.
|
inlinefinalvirtual |
Returns new key-value iterator.
Implements kagome::storage::face::Iterable< Buffer, common::BufferConstRef, BufferView >.
Definition at line 24 of file trie_batches.hpp.
|
pure virtual |