mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 15:04:04 +00:00
Add parsing for GRANT ROLE and GRANT DATABASE ROLE in Snowflake dialect (#1689)
This commit is contained in:
parent
257da5a82c
commit
ec948eaf6e
5 changed files with 94 additions and 54 deletions
|
@ -3046,7 +3046,10 @@ fn parse_grant() {
|
|||
);
|
||||
assert_eq!(
|
||||
objects,
|
||||
GrantObjects::Tables(vec![ObjectName::from(vec!["*".into(), "*".into()])])
|
||||
Some(GrantObjects::Tables(vec![ObjectName::from(vec![
|
||||
"*".into(),
|
||||
"*".into()
|
||||
])]))
|
||||
);
|
||||
assert!(!with_grant_option);
|
||||
assert!(granted_by.is_none());
|
||||
|
@ -3087,7 +3090,10 @@ fn parse_revoke() {
|
|||
);
|
||||
assert_eq!(
|
||||
objects,
|
||||
GrantObjects::Tables(vec![ObjectName::from(vec!["db1".into(), "*".into()])])
|
||||
Some(GrantObjects::Tables(vec![ObjectName::from(vec![
|
||||
"db1".into(),
|
||||
"*".into()
|
||||
])]))
|
||||
);
|
||||
if let [Grantee {
|
||||
grantee_type: GranteesType::None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue