()
| 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() { |