Relational NT
A relational database kernel shaped around NT-style object management.
Loading...
Searching...
No Matches
InMemoryBackend.h
Go to the documentation of this file.
1#pragma once
2
3#include "Api.h"
4#include "IStorageBackend.h"
5
6#include <cstdint>
7#include <optional>
8#include <string>
9#include <unordered_map>
10#include <vector>
11
21
22namespace nt {
24 public:
25 std::string Put(std::vector<uint8_t> value) override;
26 std::optional<std::vector<uint8_t>> Get(const std::string& hash) override;
27
28 private:
29 std::unordered_map<std::string, std::vector<uint8_t>> kv_;
30 };
31} // namespace nt
Defines symbol visibility for the Relational NT public API.
Abstract KV storage backend consumed by CursorManager and Merkle.
Contract between CursorManager / Merkle and a physical storage engine.
Definition IStorageBackend.h:31
Definition InMemoryBackend.h:23
std::string Put(std::vector< uint8_t > value) override
Stores a serialized value and returns its SHA256 hex hash.
Definition InMemoryBackend.cpp:6
std::optional< std::vector< uint8_t > > Get(const std::string &hash) override
Retrieves bytes by their SHA256 hex hash.
Definition InMemoryBackend.cpp:12
Contains the Relational NT runtime managers and API facade.