()
| 5120 | |
| 5121 | #[test] |
| 5122 | fn test_call_statement_with_where_clause() { |
| 5123 | let query = r#"CALL system.list_functions() |
| 5124 | YIELD name, category, description |
| 5125 | WHERE 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 | // ======================================================================== |
nothing calls this directly
no test coverage detected