Skip to main content

Crate neodiff

Crate neodiff 

Source
Expand description

§neodiff

A Neo4j graph comparison tool that identifies and reports differences between source and target databases.

§Usage

use neodiff::{diff_graphs, new_jsonl_writer, DiffConfig, GraphConfig};
use std::collections::HashSet;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let source = GraphConfig::new("bolt://source:7687", "neo4j", "pass", None);
    let target = GraphConfig::new("bolt://target:7687", "neo4j", "pass", None);
    let config = DiffConfig::new(vec![], vec![], vec![], vec![], vec![], None, None, None)?;
    let mut writer = new_jsonl_writer(std::io::stdout());
    diff_graphs(&source, &target, &config, writer.as_mut()).await
}

Structs§

Counts
Difference counts for a node label or relationship type.
DiffConfig
Configuration to include and/or exclude differences between the graphs.
DiffSummary
A summary of the differences between the source and target graphs.
GraphConfig
Connection configuration for a Neo4j Graph.
NodeRef
A reference to a node in a relationship.
Patterns
A Vec of compiled Regex patterns.

Enums§

Diff
A difference between the source and target graphs.
PropertyDiff
A node or relationship property difference.

Traits§

DiffWriter
Writes graph differences to an output destination.

Functions§

diff_graphs
Compares the source and target Neo4j graphs using the config, then outputs the differences using the writer.
new_jsonl_writer
Initializes a JSON Lines DiffWriter for the output.