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

Function parse_traverse

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

Source from the content-addressed store, hash-verified

50}
51
52pub(super) fn parse_traverse(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
53 let start = quoted_after(toks, "FROM")?;
54 let depth = usize_after(toks, "DEPTH").unwrap_or(2);
55 let edge_label = quoted_after(toks, "LABEL");
56 let direction = direction_after(toks);
57 Some(NodedbStatement::Graph(GraphStmt::GraphTraverse {
58 start,
59 depth,
60 edge_label,
61 direction,
62 }))
63}
64
65pub(super) fn parse_neighbors(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
66 let node = quoted_after(toks, "OF")?;

Callers 1

try_parseFunction · 0.85

Calls 3

quoted_afterFunction · 0.85
usize_afterFunction · 0.85
direction_afterFunction · 0.85

Tested by

no test coverage detected