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

Function create_schema_statement

graphlite/src/ast/parser.rs:2646–2664  ·  view source on GitHub ↗

Parse CREATE SCHEMA statement

(tokens: &[Token])

Source from the content-addressed store, hash-verified

2644
2645/// Parse CREATE SCHEMA statement
2646fn create_schema_statement(tokens: &[Token]) -> IResult<&[Token], CreateSchemaStatement> {
2647 map(
2648 tuple((
2649 expect_token(Token::Create),
2650 expect_token(Token::Schema),
2651 opt(tuple((
2652 expect_token(Token::If),
2653 expect_token(Token::Not),
2654 expect_token(Token::Exists),
2655 ))),
2656 validated_schema_name,
2657 )),
2658 |(_, _, if_not_exists, schema_path)| CreateSchemaStatement {
2659 schema_path,
2660 if_not_exists: if_not_exists.is_some(),
2661 location: Location::default(),
2662 },
2663 )(tokens)
2664}
2665
2666/// Parse DROP SCHEMA statement
2667fn drop_schema_statement(tokens: &[Token]) -> IResult<&[Token], DropSchemaStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected