Add Snowflake COPY/REVOKE CURRENT GRANTS option (#1926)
Some checks failed
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Rust / test (stable) (push) Has been cancelled

This commit is contained in:
Yoav Cohen 2025-07-07 17:13:57 +02:00 committed by GitHub
parent 1a33abda63
commit 93450cc250
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 0 deletions

View file

@ -13794,6 +13794,15 @@ impl<'a> Parser<'a> {
let with_grant_option =
self.parse_keywords(&[Keyword::WITH, Keyword::GRANT, Keyword::OPTION]);
let current_grants =
if self.parse_keywords(&[Keyword::COPY, Keyword::CURRENT, Keyword::GRANTS]) {
Some(CurrentGrantsKind::CopyCurrentGrants)
} else if self.parse_keywords(&[Keyword::REVOKE, Keyword::CURRENT, Keyword::GRANTS]) {
Some(CurrentGrantsKind::RevokeCurrentGrants)
} else {
None
};
let as_grantor = if self.parse_keywords(&[Keyword::AS]) {
Some(self.parse_identifier()?)
} else {
@ -13813,6 +13822,7 @@ impl<'a> Parser<'a> {
with_grant_option,
as_grantor,
granted_by,
current_grants,
})
}