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

Function drop_user_statement

graphlite/src/ast/parser.rs:3548–3565  ·  view source on GitHub ↗

Parse DROP USER statement: DROP USER [IF EXISTS] username

(tokens: &[Token])

Source from the content-addressed store, hash-verified

3546
3547/// Parse DROP USER statement: DROP USER [IF EXISTS] username
3548fn drop_user_statement(tokens: &[Token]) -> IResult<&[Token], DropUserStatement> {
3549 map(
3550 tuple((
3551 expect_token(Token::Drop),
3552 expect_token(Token::User),
3553 opt(tuple((
3554 expect_token(Token::If),
3555 expect_token(Token::Exists),
3556 ))),
3557 string_literal, // username
3558 )),
3559 |(_, _, if_exists, username)| DropUserStatement {
3560 username,
3561 if_exists: if_exists.is_some(),
3562 location: Location::default(),
3563 },
3564 )(tokens)
3565}
3566
3567/// Parse CREATE ROLE statement: CREATE ROLE role_name [DESCRIPTION 'description']
3568fn create_role_statement(tokens: &[Token]) -> IResult<&[Token], CreateRoleStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected