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

Function parse_where_not_exists

nodedb/src/engine/graph/pattern/compiler/mod.rs:293–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291
292 #[test]
293 fn parse_where_not_exists() {
294 let q = parse(
295 "MATCH (a)-[:KNOWS]->(b) WHERE NOT EXISTS { MATCH (a)-[:BLOCKED]->(b) } RETURN a, b",
296 )
297 .unwrap();
298 assert_eq!(q.where_predicates.len(), 1);
299 match &q.where_predicates[0] {
300 WherePredicate::NotExists { sub_pattern } => {
301 assert_eq!(
302 sub_pattern.patterns[0].triples[0].edge.edge_type.as_deref(),
303 Some("BLOCKED")
304 );
305 }
306 _ => panic!("expected NotExists"),
307 }
308 }
309
310 #[test]
311 fn parse_self_join() {

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected