(query: &BasicQuery, errors: &mut Vec<ValidationError>)
| 2124 | } |
| 2125 | |
| 2126 | fn validate_basic_query_edge_patterns(query: &BasicQuery, errors: &mut Vec<ValidationError>) { |
| 2127 | for pattern in &query.match_clause.patterns { |
| 2128 | for element in &pattern.elements { |
| 2129 | if let PatternElement::Edge(edge) = element { |
| 2130 | // Validate edge direction |
| 2131 | match edge.direction { |
| 2132 | EdgeDirection::Both => { |
| 2133 | // <-> is valid |
| 2134 | } |
| 2135 | EdgeDirection::Incoming => { |
| 2136 | // <- is valid |
| 2137 | } |
| 2138 | EdgeDirection::Outgoing => { |
| 2139 | // -> is valid |
| 2140 | } |
| 2141 | EdgeDirection::Undirected => { |
| 2142 | // -- is valid |
| 2143 | } |
| 2144 | } |
| 2145 | |
| 2146 | // Validate edge labels |
| 2147 | for label in &edge.labels { |
| 2148 | if label.is_empty() { |
| 2149 | errors.push(ValidationError { |
| 2150 | message: "Edge label cannot be empty".to_string(), |
| 2151 | location: None, |
| 2152 | error_type: ValidationErrorType::Syntax, |
| 2153 | }); |
| 2154 | } |
| 2155 | } |
| 2156 | } |
| 2157 | } |
| 2158 | } |
| 2159 | } |
| 2160 | |
| 2161 | /// Validate temporal literals |
| 2162 | fn validate_temporal_literals(_query: &Query, _errors: &mut Vec<ValidationError>) { |
no test coverage detected