mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-07 12:40:22 +00:00
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
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:
parent
1a33abda63
commit
93450cc250
4 changed files with 40 additions and 0 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue