19 std::unique_ptr<KeyValueDBImpl> impl;
23 friend class KeyValueDB;
27 std::unique_ptr<WriteBatchImpl> impl;
32 WriteBatch(WriteBatch
const&)
noexcept =
delete;
34 WriteBatch& operator=(WriteBatch
const&)
noexcept =
delete;
36 LLNDAPI WriteBatch(WriteBatch&&)
noexcept;
38 LLAPI WriteBatch& operator=(WriteBatch&&)
noexcept;
42 LLAPI WriteBatch& set(std::string_view key, std::string_view val);
44 LLAPI WriteBatch& del(std::string_view key);
47 LLNDAPI
explicit KeyValueDB(std::filesystem::path
const& path);
49 LLNDAPI
explicit KeyValueDB(
50 std::filesystem::path
const& path,
56 KeyValueDB(KeyValueDB
const&)
noexcept =
delete;
58 KeyValueDB& operator=(KeyValueDB
const&)
noexcept =
delete;
60 LLNDAPI KeyValueDB(KeyValueDB&&) noexcept;
62 LLAPI KeyValueDB& operator=(KeyValueDB&&) noexcept;
66 LLNDAPI
std::optional<
std::
string> get(
std::string_view key) const;
68 LLNDAPI
bool has(
std::string_view key) const;
70 LLNDAPI
bool empty() const;
72 LLAPI
bool set(
std::string_view key,
std::string_view val);
74 LLAPI
bool del(
std::string_view key);
78 LLNDAPI coro::Generator<
std::pair<
std::string_view,
std::string_view>> iter() const;