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

Function grant_role_statement

graphlite/src/ast/parser.rs:3607–3622  ·  view source on GitHub ↗

Parse GRANT ROLE statement: GRANT ROLE role_name TO username

(tokens: &[Token])

Source from the content-addressed store, hash-verified

3605
3606/// Parse GRANT ROLE statement: GRANT ROLE role_name TO username
3607fn grant_role_statement(tokens: &[Token]) -> IResult<&[Token], GrantRoleStatement> {
3608 map(
3609 tuple((
3610 expect_token(Token::Grant),
3611 expect_token(Token::Role),
3612 string_literal, // role_name
3613 expect_token(Token::To),
3614 string_literal, // username
3615 )),
3616 |(_, _, role_name, _, username)| GrantRoleStatement {
3617 role_name,
3618 username,
3619 location: Location::default(),
3620 },
3621 )(tokens)
3622}
3623
3624/// Parse REVOKE ROLE statement: REVOKE ROLE role_name FROM username
3625fn revoke_role_statement(tokens: &[Token]) -> IResult<&[Token], RevokeRoleStatement> {

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected