Skip to main content

diff

Function diff 

Source
pub fn diff(
    conn: &Connection,
    t1: &str,
    t2: &str,
    scope_path: Option<&str>,
) -> Result<GraphDiff>
Expand description

Compare the graph state at two different timestamps.

  • added — edges valid at t2 whose (from_id, to_id, relation) triple was not present at t1.
  • removed — edges valid at t1 whose triple was not present at t2.
  • changed — triples present at both t1 and t2 but with a different id (i.e. the edge was superseded), implying the properties or confidence changed.

When scope_path is Some(prefix), the diff is limited to edges within that scope hierarchy. When None, all scopes are compared (backward compatible).