MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / bound_edge_names

Method bound_edge_names

nodedb/src/engine/graph/pattern/ast.rs:235–249  ·  view source on GitHub ↗

Get all unique edge variable names bound in the query.

(&self)

Source from the content-addressed store, hash-verified

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)]

Callers

nothing calls this directly

Calls 3

containsMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected