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

Function execute_simple_one_hop

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

Source from the content-addressed store, hash-verified

397
398 #[test]
399 fn execute_simple_one_hop() {
400 let (csr, store, _dir) = make_social_graph();
401 let query =
402 super::super::compiler::parse("MATCH (a)-[:KNOWS]->(b) WHERE a = 'alice' RETURN a, b")
403 .unwrap();
404 let rows = execute(&query, &csr, &store, None).unwrap().rows;
405 assert_eq!(rows.len(), 1);
406 assert_eq!(rows[0]["a"], "alice");
407 assert_eq!(rows[0]["b"], "bob");
408 }
409
410 #[test]
411 fn execute_two_hops() {

Callers

nothing calls this directly

Calls 3

make_social_graphFunction · 0.85
executeFunction · 0.70
parseFunction · 0.50

Tested by

no test coverage detected