aboutsummaryrefslogtreecommitdiffstats
path: root/include/SqliteBackend.h
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-05-13 01:59:22 -0300
committerGitHub <noreply@github.com>2026-05-13 01:59:22 -0300
commitaf6073dedffd1a16aff7a283ded50545dc40b179 (patch)
treea4b8fbfb4842f5ac27bf7fa641555de3fac6b7f3 /include/SqliteBackend.h
parentc1b70cfe745d935bded3053fba8c1f9573aa07aa (diff)
downloadRNT-af6073dedffd1a16aff7a283ded50545dc40b179.tar.gz
RNT-af6073dedffd1a16aff7a283ded50545dc40b179.zip
Extern handles for embedded runtime
Diffstat (limited to 'include/SqliteBackend.h')
-rw-r--r--include/SqliteBackend.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/include/SqliteBackend.h b/include/SqliteBackend.h
index 0b21925..ce4e465 100644
--- a/include/SqliteBackend.h
+++ b/include/SqliteBackend.h
@@ -16,23 +16,13 @@
* kv(hash TEXT PRIMARY KEY, value BLOB NOT NULL)
* — content-addressed store; key is the SHA256 hex digest of value.
*
- * relation_index(path TEXT NOT NULL, tuple_hash TEXT NOT NULL,
- * UNIQUE(path, tuple_hash))
- * — maps a relation's logical path to the ordered set of tuple hashes
- * it contains. Corresponds to Sakura's per-relation B+ tree of
- * tuple hashes stored in the physical layer.
+ * Relation membership is tracked by the Merkle B-tree maintained in-process.
+ * The former relation_index table has been removed; tuple hashes are looked up
+ * via Merkle::Page which reads only the KV store.
*/
namespace nt
{
- /**
- * @class SqliteBackend
- * @brief IStorageBackend that persists data in a SQLite database.
- *
- * Constructed with a file path or ":memory:" for an in-process database.
- * All KV values are opaque blobs; callers are responsible for serialization
- * (see TupleCodec).
- */
class NT_API SqliteBackend : public IStorageBackend
{
public:
@@ -46,15 +36,8 @@ namespace nt
std::string Put(std::vector<uint8_t> value) override;
std::optional<std::vector<uint8_t>> Get(const std::string& hash) override;
- void LinkTuple(const std::vector<std::string>& relation_path,
- const std::string& tuple_hash) override;
- std::vector<std::string> TupleHashes(const std::vector<std::string>& relation_path,
- std::size_t offset,
- std::size_t limit) override;
private:
sqlite3* db_ = nullptr;
-
- static std::string PathKey(const std::vector<std::string>& path);
};
}