15 std::shared_ptr<BufferStorage> storage,
common::Buffer node_prefix)
16 : storage_{std::move(storage)},
node_prefix_{std::move(node_prefix)} {
20 std::unique_ptr<TrieStorageBackendImpl::Cursor>
26 std::unique_ptr<face::WriteBatch<BufferView, Buffer>>
28 return std::make_unique<TrieStorageBackendBatch>(
storage_->batch(),
Class represents arbitrary (including empty) byte buffer.
outcome::result< bool > contains(const BufferView &key) const override
outcome::result< Buffer > load(const BufferView &key) const override
std::unique_ptr< face::WriteBatch< BufferView, Buffer > > batch() override
Creates new Write Batch - an object, which can be used to efficiently write bulk data.
common::Buffer node_prefix_
outcome::result< void > remove(const common::BufferView &key) override
SLBuffer & put(std::string_view view)
Put a string into byte buffer.
size_t size() const override
std::shared_ptr< BufferStorage > storage_
TrieStorageBackendImpl(std::shared_ptr< BufferStorage > storage, common::Buffer node_prefix)
common::Buffer prefixKey(const common::BufferView &key) const
outcome::result< void > put(const BufferView &key, const Buffer &value) override
std::unique_ptr< Cursor > cursor() override
Returns new key-value iterator.
outcome::result< std::optional< Buffer > > tryLoad(const BufferView &key) const override
bool empty() const override
Returns true if the storage is empty.