Validate DROP SCHEMA statement
(
drop_schema: &DropSchemaStatement,
errors: &mut Vec<ValidationError>,
)
| 2678 | |
| 2679 | /// Validate DROP SCHEMA statement |
| 2680 | fn validate_drop_schema_statement( |
| 2681 | drop_schema: &DropSchemaStatement, |
| 2682 | errors: &mut Vec<ValidationError>, |
| 2683 | ) { |
| 2684 | // Validate schema name is not empty |
| 2685 | if drop_schema.schema_path.segments.is_empty() |
| 2686 | || drop_schema |
| 2687 | .schema_path |
| 2688 | .segments |
| 2689 | .iter() |
| 2690 | .any(|s| s.trim().is_empty()) |
| 2691 | { |
| 2692 | errors.push(ValidationError { |
| 2693 | message: "Invalid schema name".to_string(), |
| 2694 | location: Some(drop_schema.location.clone()), |
| 2695 | error_type: ValidationErrorType::Syntax, |
| 2696 | }); |
| 2697 | } |
| 2698 | } |
| 2699 | |
| 2700 | /// Validate CREATE GRAPH statement |
| 2701 | fn validate_create_graph_statement( |
no test coverage detected