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

Function validate_drop_schema_statement

graphlite/src/ast/validator.rs:2680–2698  ·  view source on GitHub ↗

Validate DROP SCHEMA statement

(
    drop_schema: &DropSchemaStatement,
    errors: &mut Vec<ValidationError>,
)

Source from the content-addressed store, hash-verified

2678
2679/// Validate DROP SCHEMA statement
2680fn 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
2701fn validate_create_graph_statement(

Callers 1

Calls 3

cloneMethod · 0.80
is_emptyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected