mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
896 B
896 B
Change Detection / Diff
changes/mod.rs. Three-level algorithm:
- Manifest diff: skip sub-tables whose
(table_version, table_branch)is unchanged. - Lineage check:
- Same branch lineage → fast path: use the per-row
_row_last_updated_at_versioncolumn to classify Insert/Update/Delete. - Different lineages → ID-based streaming comparison.
- Same branch lineage → fast path: use the per-row
- Row-level diff: streaming, no full materialization.
Public API
diff_between(from: ReadTarget, to: ReadTarget, filter: Option<ChangeFilter>) -> ChangeSetdiff_commits(from_commit_id, to_commit_id, filter)— cross-branch safe.
Types
ChangeOp: Insert | Update | Delete
EntityKind: Node | Edge
EntityChange { table_key, kind, type_name, id, op, manifest_version, endpoints?: {src, dst} }
ChangeFilter { kinds?, type_names?, ops? }
ChangeSet { from_version, to_version, branch?, changes[], stats }