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

Function validate_edge_patterns

graphlite/src/ast/validator.rs:2090–2124  ·  view source on GitHub ↗

Validate edge patterns

(query: &Query, errors: &mut Vec<ValidationError>)

Source from the content-addressed store, hash-verified

2088
2089/// Validate edge patterns
2090fn validate_edge_patterns(query: &Query, errors: &mut Vec<ValidationError>) {
2091 match query {
2092 Query::Basic(basic_query) => {
2093 validate_basic_query_edge_patterns(basic_query, errors);
2094 }
2095 Query::SetOperation(set_op) => {
2096 validate_edge_patterns(&set_op.left, errors);
2097 validate_edge_patterns(&set_op.right, errors);
2098 }
2099 Query::Limited { query, .. } => {
2100 validate_edge_patterns(query, errors);
2101 }
2102 Query::WithQuery(_) => {
2103 // TODO: Implement WithQuery validation
2104 }
2105 Query::Let(_) => {
2106 // TODO: Implement LET validation
2107 }
2108 Query::For(_) => {
2109 // TODO: Implement FOR validation
2110 }
2111 Query::Filter(_) => {
2112 // TODO: Implement FILTER validation
2113 }
2114 Query::Return(_) => {
2115 // TODO: Implement RETURN validation
2116 }
2117 Query::Unwind(_) => {
2118 // TODO: Implement UNWIND validation
2119 }
2120 Query::MutationPipeline(_) => {
2121 // TODO: Validate mutation pipeline
2122 }
2123 }
2124}
2125
2126fn validate_basic_query_edge_patterns(query: &BasicQuery, errors: &mut Vec<ValidationError>) {
2127 for pattern in &query.match_clause.patterns {

Callers 2

validate_queryFunction · 0.85
validate_subqueryFunction · 0.85

Calls 1

Tested by

no test coverage detected