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

Function parse_path

nodedb-sql/src/ddl_ast/graph_parse/variants.rs:76–87  ·  view source on GitHub ↗
(toks: &[Tok<'_>])

Source from the content-addressed store, hash-verified

74}
75
76pub(super) fn parse_path(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
77 let src = quoted_after(toks, "FROM")?;
78 let dst = quoted_after(toks, "TO")?;
79 let max_depth = usize_after(toks, "MAX_DEPTH").unwrap_or(10);
80 let edge_label = quoted_after(toks, "LABEL");
81 Some(NodedbStatement::Graph(GraphStmt::GraphPath {
82 src,
83 dst,
84 max_depth,
85 edge_label,
86 }))
87}
88
89pub(super) fn parse_algo(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
90 let algorithm =

Callers 1

try_parseFunction · 0.85

Calls 2

quoted_afterFunction · 0.85
usize_afterFunction · 0.85

Tested by

no test coverage detected