6 #ifndef KAGOME_STORAGE_TRIE_IMPL_TRIE_BATCH 7 #define KAGOME_STORAGE_TRIE_IMPL_TRIE_BATCH 18 public face::Iterable<Buffer, common::BufferConstRef, BufferView> {
24 std::unique_ptr<Cursor>
cursor() final {
28 virtual std::unique_ptr<PolkadotTrieCursor>
trieCursor() = 0;
33 virtual outcome::result<std::tuple<bool, uint32_t>>
clearPrefix(
35 std::optional<uint64_t> limit = std::nullopt) = 0;
46 public std::enable_shared_from_this<PersistentTrieBatch> {
52 virtual outcome::result<RootHash> commit() = 0;
57 virtual std::unique_ptr<TopperTrieBatch> batchOnTop() = 0;
69 virtual outcome::result<RootHash> hash() = 0;
81 virtual outcome::result<void> writeBack() = 0;
86 #endif // KAGOME_STORAGE_TRIE_IMPL_TRIE_BATCH A mixin for read-only map.
An abstraction over generic map cursor.
A mixin for an iterable map.
An mixin for modifiable map.
~TrieBatch() override=default
virtual outcome::result< std::tuple< bool, uint32_t > > clearPrefix(const BufferView &prefix, std::optional< uint64_t > limit=std::nullopt)=0
virtual std::unique_ptr< PolkadotTrieCursor > trieCursor()=0
std::unique_ptr< Cursor > cursor() final
Returns new key-value iterator.