diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
| commit | ab70e5461b98ddf2b56268c53c171cab89157027 (patch) | |
| tree | 3e57218edacc8e1366e0d1a86bdb922af7e51dca /include/SqliteBackend.h | |
| parent | a4f6637601548a7158869ad155f29db50b151823 (diff) | |
| download | RNT-ab70e5461b98ddf2b56268c53c171cab89157027.tar.gz RNT-ab70e5461b98ddf2b56268c53c171cab89157027.zip | |
Nuke the old code
Diffstat (limited to '')
| -rw-r--r-- | include/SqliteBackend.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/include/SqliteBackend.h b/include/SqliteBackend.h deleted file mode 100644 index 037d8e6..0000000 --- a/include/SqliteBackend.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include "Api.h" -#include "IStorageBackend.h" - -#include <sqlite3.h> -#include <string> -#include <vector> - -/** - * @file SqliteBackend.h - * @brief IStorageBackend implementation backed by an in-process SQLite database. - * - * SQLite schema: - * - * kv(hash TEXT PRIMARY KEY, value BLOB NOT NULL) - * — content-addressed store; key is the SHA256 hex digest of value. - * - * 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 : public IStorageBackend { - public: - /** - * @brief Opens (or creates) a SQLite database at @p path. - * @param path File path, or ":memory:" for an in-process database. - * @throws std::runtime_error if the database cannot be opened. - */ - explicit SqliteBackend(const std::string& path = ":memory:"); - ~SqliteBackend() override; - - std::string Put(std::vector<uint8_t> value) override; - std::optional<std::vector<uint8_t>> Get(const std::string& hash) override; - - private: - sqlite3* db_ = nullptr; - }; -} // namespace nt |
