#pragma once #include "Api.h" #include "IStorageBackend.h" #include #include #include #include #include /** * @file InMemoryBackend.h * @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 { class InMemoryBackend : public IStorageBackend { public: std::string Put(std::vector value) override; std::optional> Get(const std::string& hash) override; private: std::unordered_map> kv_; }; } // namespace nt