MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / drop_schema_statement

Function drop_schema_statement

graphlite/src/ast/parser.rs:2667–2689  ·  view source on GitHub ↗

Parse DROP SCHEMA statement

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2665
2666/// Parse DROP SCHEMA statement
2667fn drop_schema_statement(tokens: &[Token]) -> IResult<&[Token], DropSchemaStatement> {
2668 map(
2669 tuple((
2670 expect_token(Token::Drop),
2671 expect_token(Token::Schema),
2672 opt(tuple((
2673 expect_token(Token::If),
2674 expect_token(Token::Exists),
2675 ))),
2676 catalog_path,
2677 opt(alt((
2678 value(true, expect_token(Token::Cascade)),
2679 value(false, expect_token(Token::Restrict)),
2680 ))),
2681 )),
2682 |(_, _, if_exists, schema_path, cascade)| DropSchemaStatement {
2683 schema_path,
2684 if_exists: if_exists.is_some(),
2685 cascade: cascade.unwrap_or(false),
2686 location: Location::default(),
2687 },
2688 )(tokens)
2689}
2690
2691/// Parse CREATE GRAPH statement
2692fn create_graph_statement(tokens: &[Token]) -> IResult<&[Token], CreateGraphStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected