MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / execute_two_hops

Function execute_two_hops

nodedb/src/engine/graph/pattern/executor/mod.rs:411–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

409
410 #[test]
411 fn execute_two_hops() {
412 let (csr, store, _dir) = make_social_graph();
413 let query = super::super::compiler::parse(
414 "MATCH (a)-[:KNOWS]->(b)-[:KNOWS]->(c) WHERE a = 'alice' RETURN a, b, c",
415 )
416 .unwrap();
417 let rows = execute(&query, &csr, &store, None).unwrap().rows;
418 assert_eq!(rows.len(), 1);
419 assert_eq!(rows[0]["c"], "carol");
420 }
421
422 #[test]
423 fn execute_optional_match() {

Callers

nothing calls this directly

Calls 3

make_social_graphFunction · 0.85
executeFunction · 0.70
parseFunction · 0.50

Tested by

no test coverage detected