Skip to main content

build_declared_relationships_expr

Function build_declared_relationships_expr 

Source
pub fn build_declared_relationships_expr(catalog: &str) -> CreateTableExpr
Expand description

Builds the CREATE TABLE request for the declared-edge table. Columns mirror the computed semantic_relationships shape (temporal window + endpoints + provenance/confidence + RED metrics) plus the declared-only business validity window (valid_from / valid_until), which — unlike TTL (physical retention) — expresses whether a hand-declared edge is still in effect.

The default LastRow merge dedups on primary key plus observed_at (the time index is part of mito’s dedup key): re-asserting an edge at a new observed_at stores a new revision, and the read-side union keeps only the latest revision per edge key.