MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_call_where_not_in

Function test_call_where_not_in

graphlite/src/ast/parser.rs:5285–5310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5283
5284#[test]
5285fn test_call_where_not_in() {
5286 // Bug #2: NOT IN should also work with parenthesized lists
5287 let query = r#"CALL system.list_functions()
5288YIELD name, category
5289WHERE category NOT IN ('aggregate', 'utility');"#;
5290
5291 let result = parse_query(query);
5292 assert!(result.is_ok(), "Failed to parse WHERE NOT IN");
5293
5294 let doc = result.unwrap();
5295 if let Statement::Call(ref call_stmt) = doc.statement {
5296 let where_clause = call_stmt
5297 .where_clause
5298 .as_ref()
5299 .expect("WHERE clause should be present");
5300
5301 match &where_clause.condition {
5302 Expression::Binary(binary) => {
5303 assert_eq!(binary.operator, Operator::NotIn, "Expected NotIn operator");
5304 }
5305 other => panic!("Expected Binary expression with NOT IN, got {:?}", other),
5306 }
5307 } else {
5308 panic!("Expected CallStatement");
5309 }
5310}
5311
5312#[test]
5313fn test_call_with_return_rejected() {

Callers

nothing calls this directly

Calls 2

parse_queryFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected