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

Method parse_drop

nodedb-sql/src/parser/array_stmt/parse_impl.rs:300–315  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

298 // ── DROP ARRAY ───────────────────────────────────────────────
299
300 pub(super) fn parse_drop(&mut self) -> Result<DropArrayAst> {
301 let if_exists = if self.match_kw("IF") {
302 self.expect_kw("EXISTS")?;
303 true
304 } else {
305 false
306 };
307 let name = self.expect_ident()?;
308 if !self.at_end() {
309 return Err(self.err(format!(
310 "trailing tokens after DROP ARRAY: {:?}",
311 self.peek()
312 )));
313 }
314 Ok(DropArrayAst { name, if_exists })
315 }
316
317 // ── INSERT INTO ARRAY ────────────────────────────────────────
318

Callers 1

Calls 5

match_kwMethod · 0.80
expect_kwMethod · 0.80
expect_identMethod · 0.80
at_endMethod · 0.80
errMethod · 0.45

Tested by

no test coverage detected