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

Function parse_insert_edge

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

Source from the content-addressed store, hash-verified

11};
12
13pub(super) fn parse_insert_edge(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
14 let collection = quoted_after(toks, "IN")?;
15 let src = quoted_after(toks, "FROM")?;
16 let dst = quoted_after(toks, "TO")?;
17 let label = quoted_after(toks, "TYPE")?;
18 let properties = extract_properties(toks);
19 Some(NodedbStatement::Graph(GraphStmt::GraphInsertEdge {
20 collection,
21 src,
22 dst,
23 label,
24 properties,
25 }))
26}
27
28pub(super) fn parse_delete_edge(toks: &[Tok<'_>]) -> Option<NodedbStatement> {
29 let collection = quoted_after(toks, "IN")?;

Callers 1

try_parseFunction · 0.85

Calls 2

quoted_afterFunction · 0.85
extract_propertiesFunction · 0.85

Tested by

no test coverage detected