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

Method parse_grant

src/sql-parser/src/parser.rs:9544–9553  ·  view source on GitHub ↗

Parse a `GRANT` statement, assuming that the `GRANT` token has already been consumed.

(&mut self)

Source from the content-addressed store, hash-verified

9542 /// Parse a `GRANT` statement, assuming that the `GRANT` token
9543 /// has already been consumed.
9544 fn parse_grant(&mut self) -> Result<Statement<Raw>, ParserStatementError> {
9545 match self.parse_privilege_specification() {
9546 Some(privileges) => self
9547 .parse_grant_privilege(privileges)
9548 .map_parser_err(StatementKind::GrantPrivileges),
9549 None => self
9550 .parse_grant_role()
9551 .map_parser_err(StatementKind::GrantRole),
9552 }
9553 }
9554
9555 /// Parse a `GRANT PRIVILEGE` statement, assuming that the `GRANT` token
9556 /// and all privileges have already been consumed.

Callers 1

parse_statement_innerMethod · 0.80

Calls 4

map_parser_errMethod · 0.80
parse_grant_privilegeMethod · 0.80
parse_grant_roleMethod · 0.80

Tested by

no test coverage detected