Validate a subquery recursively
(
query: &Query,
ctx: &mut ValidationContext,
errors: &mut Vec<ValidationError>,
)
| 2537 | |
| 2538 | /// Validate a subquery recursively |
| 2539 | fn validate_subquery( |
| 2540 | query: &Query, |
| 2541 | ctx: &mut ValidationContext, |
| 2542 | errors: &mut Vec<ValidationError>, |
| 2543 | ) { |
| 2544 | // Create a new context scope for the subquery to avoid variable leakage |
| 2545 | let mut subquery_ctx = ctx.clone(); |
| 2546 | |
| 2547 | // Validate the query structure |
| 2548 | validate_query_structure(query, errors); |
| 2549 | |
| 2550 | // Validate variable declarations and scope within subquery |
| 2551 | validate_variable_declarations(query, &mut subquery_ctx, errors); |
| 2552 | |
| 2553 | // Validate path patterns within subquery |
| 2554 | validate_path_patterns(query, &mut subquery_ctx, errors); |
| 2555 | |
| 2556 | // Validate expressions within subquery |
| 2557 | validate_expressions(query, &mut subquery_ctx, errors); |
| 2558 | |
| 2559 | // Validate temporal literals within subquery |
| 2560 | validate_temporal_literals(query, errors); |
| 2561 | |
| 2562 | // Validate edge patterns within subquery |
| 2563 | validate_edge_patterns(query, errors); |
| 2564 | } |
| 2565 | |
| 2566 | /// Validate a statement within a procedure body context |
| 2567 | /// In procedure bodies, statements have different validation rules: |
no test coverage detected