Get all unique edge variable names bound in the query.
(&self)
| 233 | |
| 234 | /// Get all unique edge variable names bound in the query. |
| 235 | pub fn bound_edge_names(&self) -> Vec<String> { |
| 236 | let mut names = Vec::new(); |
| 237 | for clause in &self.clauses { |
| 238 | for chain in &clause.patterns { |
| 239 | for triple in &chain.triples { |
| 240 | if let Some(ref n) = triple.edge.name |
| 241 | && !names.contains(n) |
| 242 | { |
| 243 | names.push(n.clone()); |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | } |
| 248 | names |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | #[cfg(test)] |