aboutsummaryrefslogtreecommitdiffstats
path: root/include/IStorageBackend.h
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-07-02 00:31:57 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-07-02 00:31:57 +0000
commitab70e5461b98ddf2b56268c53c171cab89157027 (patch)
tree3e57218edacc8e1366e0d1a86bdb922af7e51dca /include/IStorageBackend.h
parenta4f6637601548a7158869ad155f29db50b151823 (diff)
downloadRNT-ab70e5461b98ddf2b56268c53c171cab89157027.tar.gz
RNT-ab70e5461b98ddf2b56268c53c171cab89157027.zip
Nuke the old code
Diffstat (limited to '')
-rw-r--r--include/IStorageBackend.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/include/IStorageBackend.h b/include/IStorageBackend.h
deleted file mode 100644
index a7cc782..0000000
--- a/include/IStorageBackend.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-#include <cstdint>
-#include <optional>
-#include <string>
-#include <vector>
-
-/**
- * @file IStorageBackend.h
- * @brief Abstract KV storage backend consumed by CursorManager and Merkle.
- *
- * Storage is strictly content-addressed: every value is stored under its
- * SHA256 hex digest. Relation membership (which tuple hashes belong to a
- * given relation) is now tracked via the Merkle B-tree maintained by the
- * Merkle class, not by this interface. Only Put and Get are required.
- */
-
-namespace nt {
- /**
- * @interface IStorageBackend
- * @brief Contract between CursorManager / Merkle and a physical storage engine.
- *
- * Two primitives are sufficient:
- * - Put: store bytes, get back the content-address (SHA256 hex).
- * - Get: retrieve bytes by content-address.
- *
- * Both are idempotent. The Merkle class stores node blobs via Put/Get and
- * maintains insertion-order-independent relation membership on top of these
- * two primitives.
- */
- class IStorageBackend {
- public:
- virtual ~IStorageBackend() = default;
-
- /**
- * @brief Stores a serialized value and returns its SHA256 hex hash.
- *
- * Idempotent: storing the same bytes twice does not create a duplicate.
- * The returned hash is the only valid key for subsequent Get calls.
- */
- virtual std::string Put(std::vector<uint8_t> value) = 0;
-
- /**
- * @brief Retrieves bytes by their SHA256 hex hash.
- * @return The stored bytes, or std::nullopt when the hash is unknown.
- */
- virtual std::optional<std::vector<uint8_t>> Get(const std::string& hash) = 0;
- };
-} // namespace nt