MCPcopy Create free account
hub / github.com/Pometry/Raphtory / node_patterns

Method node_patterns

raphtory-cypher/src/parser/ast.rs:44–59  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

42 }
43
44 pub fn node_patterns(&self) -> impl Iterator<Item = &NodePattern> + '_ {
45 self.clauses()
46 .iter()
47 .filter_map(|clause| match clause {
48 Clause::Match(m) => {
49 let iter = m.pattern.0.iter().map(|part: &PatternPart| {
50 std::iter::once(&part.node)
51 .chain(part.rel_chain.iter().map(|(_, node)| node))
52 });
53 Some(iter)
54 }
55 _ => None,
56 })
57 .flatten()
58 .flatten()
59 }
60
61 pub fn node_patterns_mut(&mut self) -> impl Iterator<Item = &mut NodePattern> + '_ {
62 self.clauses_mut()

Callers 7

to_sqlFunction · 0.80
unbind_unused_bindsFunction · 0.80
max_bind_countFunction · 0.80
parse_rels_to_ctesFunction · 0.80
all_bound_nodesFunction · 0.80
parse_tables_2Function · 0.80
where_exprFunction · 0.80

Calls 4

clausesMethod · 0.80
flattenMethod · 0.45
iterMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected