MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_revoke_privilege

Method parse_revoke_privilege

src/sql-parser/src/parser.rs:9599–9612  ·  view source on GitHub ↗

Parse a `REVOKE PRIVILEGE` statement, assuming that the `REVOKE` token and all privileges have already been consumed.

(
        &mut self,
        privileges: PrivilegeSpecification,
    )

Source from the content-addressed store, hash-verified

9597 /// Parse a `REVOKE PRIVILEGE` statement, assuming that the `REVOKE` token
9598 /// and all privileges have already been consumed.
9599 fn parse_revoke_privilege(
9600 &mut self,
9601 privileges: PrivilegeSpecification,
9602 ) -> Result<Statement<Raw>, ParserError> {
9603 self.expect_keyword(ON)?;
9604 let target = self.expect_grant_target_specification("REVOKE")?;
9605 self.expect_keyword(FROM)?;
9606 let roles = self.parse_comma_separated(Parser::expect_role_specification)?;
9607 Ok(Statement::RevokePrivileges(RevokePrivilegesStatement {
9608 privileges,
9609 target,
9610 roles,
9611 }))
9612 }
9613
9614 /// Parse a `REVOKE ROLE` statement, assuming that the `REVOKE` token
9615 /// has already been consumed.

Callers 1

parse_revokeMethod · 0.80

Calls 3

expect_keywordMethod · 0.80
parse_comma_separatedMethod · 0.80

Tested by

no test coverage detected