Parse CREATE SCHEMA statement
(tokens: &[Token])
| 2644 | |
| 2645 | /// Parse CREATE SCHEMA statement |
| 2646 | fn 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 |
| 2667 | fn drop_schema_statement(tokens: &[Token]) -> IResult<&[Token], DropSchemaStatement> { |
nothing calls this directly
no test coverage detected