From af6073dedffd1a16aff7a283ded50545dc40b179 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Wed, 13 May 2026 01:59:22 -0300 Subject: Extern handles for embedded runtime --- include/InMemoryBackend.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'include/InMemoryBackend.h') diff --git a/include/InMemoryBackend.h b/include/InMemoryBackend.h index 8f7f50a..55472a8 100644 --- a/include/InMemoryBackend.h +++ b/include/InMemoryBackend.h @@ -11,33 +11,23 @@ /** * @file InMemoryBackend.h - * @brief In-process KV storage backend backed by unordered_maps. + * @brief In-process KV storage backend backed by an unordered_map. + * + * Intended for unit tests where SQLite is not appropriate. Data does not + * survive process exit and is not thread-safe. + * + * Relation membership is tracked by the Merkle class, not this backend. */ namespace nt { - /** - * @interface InMemoryBackend - * @brief IStorageBackend implementation that keeps all data in process memory. - * - * Intended for unit tests where SQLite is not appropriate. Data does not - * survive process exit and is not thread-safe. - */ class NT_API InMemoryBackend : public IStorageBackend { public: std::string Put(std::vector value) override; std::optional> Get(const std::string& hash) override; - void LinkTuple(const std::vector& relation_path, - const std::string& tuple_hash) override; - std::vector TupleHashes(const std::vector& relation_path, - std::size_t offset, - std::size_t limit) override; private: std::unordered_map> kv_; - std::unordered_map> index_; - - static std::string PathKey(const std::vector& path); }; } -- cgit v1.2.3