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

Function parse_pattern_chains

nodedb/src/engine/graph/pattern/compiler/mod.rs:164–171  ·  view source on GitHub ↗

Parse comma-separated pattern chains.

(text: &str)

Source from the content-addressed store, hash-verified

162
163/// Parse comma-separated pattern chains.
164fn parse_pattern_chains(text: &str) -> crate::Result<Vec<PatternChain>> {
165 let chain_texts = split_top_level_commas(text);
166 let mut chains = Vec::new();
167 for chain_text in chain_texts {
168 chains.push(parse_single_chain(chain_text.trim())?);
169 }
170 Ok(chains)
171}
172
173/// Parse a single pattern chain: `(a:Person)-[:KNOWS]->(b:Person)-[:KNOWS]->(c)`.
174fn parse_single_chain(text: &str) -> crate::Result<PatternChain> {

Callers 1

parse_match_clausesFunction · 0.85

Calls 3

parse_single_chainFunction · 0.85
split_top_level_commasFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected