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

Function parse_set_labels

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

Source from the content-addressed store, hash-verified

39}
40
41pub(super) fn parse_set_labels(toks: &[Tok<'_>], remove: bool) -> Option<NodedbStatement> {
42 let keyword = if remove { "UNLABEL" } else { "LABEL" };
43 let node_id = quoted_after(toks, keyword)?;
44 let labels = quoted_list_after(toks, "AS");
45 Some(NodedbStatement::Graph(GraphStmt::GraphSetLabels {
46 node_id,
47 labels,
48 remove,
49 }))
50}
51
52pub(super) fn parse_traverse(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
53 let start = quoted_after(toks, "FROM")?;

Callers 1

try_parseFunction · 0.85

Calls 2

quoted_afterFunction · 0.85
quoted_list_afterFunction · 0.85

Tested by

no test coverage detected