Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::RowLineageTracker Class Reference

Per-row lineage tracking inspired by Iceberg V3-style data governance. More...

#include <row_lineage.hpp>

Classes

struct  RowLineage
 Lineage metadata for a single row. More...
 

Public Member Functions

 RowLineageTracker (const std::string &origin_file="", int32_t initial_version=1)
 Construct a tracker for the given origin file and initial version.
 
RowLineage next (const uint8_t *row_data, size_t row_size)
 Generate lineage for the next row.
 
int64_t current_row_id () const noexcept
 Get current row counter (next row_id to be assigned).
 
void reset (const std::string &origin_file, int32_t version=1)
 Reset the origin file and version for a new batch.
 

Detailed Description

Per-row lineage tracking inspired by Iceberg V3-style data governance.

Generates monotonic row IDs, tracks mutation versions, records origin file/batch identifiers, and maintains a SHA-256 per-row hash chain for tamper-evident ordering. This extends the batch-level audit chain (audit_chain.hpp) to row granularity.

Row IDs are monotonically increasing and never reset, even across batches. The hash chain is also continuous across reset() calls.

See also
audit_chain.hpp

Definition at line 46 of file row_lineage.hpp.

Constructor & Destructor Documentation

◆ RowLineageTracker()

signet::forge::RowLineageTracker::RowLineageTracker ( const std::string &  origin_file = "",
int32_t  initial_version = 1 
)
inlineexplicit

Construct a tracker for the given origin file and initial version.

Parameters
origin_fileSource file/batch identifier (stored in each RowLineage).
initial_versionStarting mutation version counter.
Exceptions
std::runtime_errorif the commercial license is required but missing.

Definition at line 61 of file row_lineage.hpp.

Member Function Documentation

◆ current_row_id()

int64_t signet::forge::RowLineageTracker::current_row_id ( ) const
inlinenoexcept

Get current row counter (next row_id to be assigned).

Definition at line 97 of file row_lineage.hpp.

◆ next()

RowLineage signet::forge::RowLineageTracker::next ( const uint8_t *  row_data,
size_t  row_size 
)
inline

Generate lineage for the next row.

row_data is the serialized row bytes used to compute the per-row hash chain.

Definition at line 77 of file row_lineage.hpp.

◆ reset()

void signet::forge::RowLineageTracker::reset ( const std::string &  origin_file,
int32_t  version = 1 
)
inline

Reset the origin file and version for a new batch.

Row ID is NOT reset (monotonic across batches). Hash chain is NOT reset (chain continuity is preserved).

Parameters
origin_fileNew source file/batch identifier.
versionNew mutation version counter.

Definition at line 106 of file row_lineage.hpp.


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