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

Function test_call_statement_with_where_clause

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

Source from the content-addressed store, hash-verified

5120
5121 #[test]
5122 fn test_call_statement_with_where_clause() {
5123 let query = r#"CALL system.list_functions()
5124YIELD name, category, description
5125WHERE category = 'text' OR category = 'hybrid' OR category = 'fuzzy';"#;
5126
5127 log::debug!("\n=== Testing WHERE clause parsing");
5128 let result = parse_query(query);
5129
5130 assert!(result.is_ok(), "Query parsing should succeed");
5131
5132 let doc = result.unwrap();
5133 if let Statement::Call(ref call_stmt) = doc.statement {
5134 log::debug!("Procedure: {}", call_stmt.procedure_name);
5135 log::debug!("Has YIELD: {}", call_stmt.yield_clause.is_some());
5136 log::debug!("Has WHERE: {}", call_stmt.where_clause.is_some());
5137
5138 assert!(
5139 call_stmt.where_clause.is_some(),
5140 "WHERE clause should be captured!"
5141 );
5142 } else {
5143 panic!("Expected Call statement");
5144 }
5145 }
5146}
5147
5148// ========================================================================

Callers

nothing calls this directly

Calls 2

parse_queryFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected