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

Function parse_where_equals

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

Source from the content-addressed store, hash-verified

261
262 #[test]
263 fn parse_where_equals() {
264 let q = parse("MATCH (a:Person)-[:KNOWS]->(b) WHERE a.name = 'Alice' RETURN b").unwrap();
265 assert_eq!(q.where_predicates.len(), 1);
266 match &q.where_predicates[0] {
267 WherePredicate::Equals {
268 binding,
269 field,
270 value,
271 } => {
272 assert_eq!(binding, "a");
273 assert_eq!(field, "name");
274 assert_eq!(value, "Alice");
275 }
276 _ => panic!("expected Equals predicate"),
277 }
278 }
279
280 #[test]
281 fn parse_where_comparison() {

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected