Validate CREATE SCHEMA statement
(
create_schema: &CreateSchemaStatement,
errors: &mut Vec<ValidationError>,
)
| 2657 | |
| 2658 | /// Validate CREATE SCHEMA statement |
| 2659 | fn validate_create_schema_statement( |
| 2660 | create_schema: &CreateSchemaStatement, |
| 2661 | errors: &mut Vec<ValidationError>, |
| 2662 | ) { |
| 2663 | // Validate schema name is not empty |
| 2664 | if create_schema.schema_path.segments.is_empty() |
| 2665 | || create_schema |
| 2666 | .schema_path |
| 2667 | .segments |
| 2668 | .iter() |
| 2669 | .any(|s| s.trim().is_empty()) |
| 2670 | { |
| 2671 | errors.push(ValidationError { |
| 2672 | message: "Invalid schema name".to_string(), |
| 2673 | location: Some(create_schema.location.clone()), |
| 2674 | error_type: ValidationErrorType::Syntax, |
| 2675 | }); |
| 2676 | } |
| 2677 | } |
| 2678 | |
| 2679 | /// Validate DROP SCHEMA statement |
| 2680 | fn validate_drop_schema_statement( |
no test coverage detected