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.
- Diff
Config - Configuration to include and/or exclude differences between the graphs.
- Diff
Summary - A summary of the differences between the source and target graphs.
- Graph
Config - Connection configuration for a Neo4j
Graph. - NodeRef
- A reference to a node in a relationship.
- Patterns
- A
Vecof compiledRegexpatterns.
Enums§
- Diff
- A difference between the source and target graphs.
- Property
Diff - A node or relationship property difference.
Traits§
- Diff
Writer - 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 thewriter. - new_
jsonl_ writer - Initializes a JSON Lines
DiffWriterfor theoutput.