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

Function parse_graph_path

nodedb-sql/src/ddl_ast/graph_parse/mod.rs:173–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171
172 #[test]
173 fn parse_graph_path() {
174 let stmt = try_parse("GRAPH PATH FROM 'a' TO 'b' MAX_DEPTH 5 LABEL 'l'").unwrap();
175 match stmt {
176 NodedbStatement::Graph(GraphStmt::GraphPath {
177 src,
178 dst,
179 max_depth,
180 edge_label,
181 }) => {
182 assert_eq!(src, "a");
183 assert_eq!(dst, "b");
184 assert_eq!(max_depth, 5);
185 assert_eq!(edge_label.as_deref(), Some("l"));
186 }
187 other => panic!("expected GraphPath, got {other:?}"),
188 }
189 }
190
191 #[test]
192 fn parse_graph_labels_list() {

Callers

nothing calls this directly

Calls 1

try_parseFunction · 0.70

Tested by

no test coverage detected