Relational NT
A relational database kernel shaped around NT-style object management.
Loading...
Searching...
No Matches
nt::InMemoryBackend Class Reference
Inheritance diagram for nt::InMemoryBackend:
nt::IStorageBackend

Public Member Functions

std::string Put (std::vector< uint8_t > value) override
 Stores a serialized value and returns its SHA256 hex hash.
std::optional< std::vector< uint8_t > > Get (const std::string &hash) override
 Retrieves bytes by their SHA256 hex hash.

Member Function Documentation

◆ Get()

std::optional< std::vector< uint8_t > > nt::InMemoryBackend::Get ( const std::string & hash)
overridevirtual

Retrieves bytes by their SHA256 hex hash.

Returns
The stored bytes, or std::nullopt when the hash is unknown.

Implements nt::IStorageBackend.

◆ Put()

std::string nt::InMemoryBackend::Put ( std::vector< uint8_t > value)
overridevirtual

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.

Implements nt::IStorageBackend.


The documentation for this class was generated from the following files: