Relational NT
A relational database kernel shaped around NT-style object management.
Loading...
Searching...
No Matches
TupleCodec.h
Go to the documentation of this file.
1#pragma once
2
3#include "Types.h"
4
5#include <cstdint>
6#include <string>
7#include <vector>
8
25
26namespace nt::TupleCodec {
36 std::string Hash(const std::vector<Attribute>& attrs);
37
43 std::vector<uint8_t> Serialize(const std::vector<Attribute>& attrs);
44
50 std::vector<Attribute> Deserialize(const std::vector<uint8_t>& bytes);
51} // namespace nt::TupleCodec
std::vector< uint8_t > Serialize(const std::vector< Attribute > &attrs)
Serializes a tuple's attributes to raw bytes for KV storage.
Definition TupleCodec.cpp:22
std::string Hash(const std::vector< Attribute > &attrs)
Computes the SHA256 hex digest of the serialized tuple.
Definition TupleCodec.cpp:17
std::vector< Attribute > Deserialize(const std::vector< uint8_t > &bytes)
Reconstructs attributes from the bytes returned by Serialize().
Definition TupleCodec.cpp:42
Shared enum types and core data types used by the runtime.