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

Function parse_create_collection

nodedb-sql/src/ddl_ast/parse/dispatch.rs:119–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118 #[test]
119 fn parse_create_collection() {
120 let stmt = ok("CREATE COLLECTION users (id INT, name TEXT)");
121 match stmt {
122 NodedbStatement::Collection(CollectionStmt::CreateCollection {
123 name,
124 if_not_exists,
125 ..
126 }) => {
127 assert_eq!(name, "users");
128 assert!(!if_not_exists);
129 }
130 other => panic!("expected CreateCollection, got {other:?}"),
131 }
132 }
133
134 #[test]
135 fn parse_create_collection_if_not_exists() {

Callers

nothing calls this directly

Calls 1

okFunction · 0.70

Tested by

no test coverage detected