Parse a `GRANT PRIVILEGE` statement, assuming that the `GRANT` token and all privileges have already been consumed.
(
&mut self,
privileges: PrivilegeSpecification,
)
| 9555 | /// Parse a `GRANT PRIVILEGE` statement, assuming that the `GRANT` token |
| 9556 | /// and all privileges have already been consumed. |
| 9557 | fn parse_grant_privilege( |
| 9558 | &mut self, |
| 9559 | privileges: PrivilegeSpecification, |
| 9560 | ) -> Result<Statement<Raw>, ParserError> { |
| 9561 | self.expect_keyword(ON)?; |
| 9562 | let target = self.expect_grant_target_specification("GRANT")?; |
| 9563 | self.expect_keyword(TO)?; |
| 9564 | let roles = self.parse_comma_separated(Parser::expect_role_specification)?; |
| 9565 | Ok(Statement::GrantPrivileges(GrantPrivilegesStatement { |
| 9566 | privileges, |
| 9567 | target, |
| 9568 | roles, |
| 9569 | })) |
| 9570 | } |
| 9571 | |
| 9572 | /// Parse a `GRANT ROLE` statement, assuming that the `GRANT` token |
| 9573 | /// has already been consumed. |
no test coverage detected