Get all unique node variable names bound in the query.
(&self)
| 211 | impl MatchQuery { |
| 212 | /// Get all unique node variable names bound in the query. |
| 213 | pub fn bound_node_names(&self) -> Vec<String> { |
| 214 | let mut names = Vec::new(); |
| 215 | for clause in &self.clauses { |
| 216 | for chain in &clause.patterns { |
| 217 | for triple in &chain.triples { |
| 218 | if let Some(ref n) = triple.src.name |
| 219 | && !names.contains(n) |
| 220 | { |
| 221 | names.push(n.clone()); |
| 222 | } |
| 223 | if let Some(ref n) = triple.dst.name |
| 224 | && !names.contains(n) |
| 225 | { |
| 226 | names.push(n.clone()); |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | names |
| 232 | } |
| 233 | |
| 234 | /// Get all unique edge variable names bound in the query. |
| 235 | pub fn bound_edge_names(&self) -> Vec<String> { |
no test coverage detected