@@ -8376,6 +8376,8 @@ pub enum Action {
83768376
83778377 /// Read access.
83788378 Read ,
8379+ /// Write access.
8380+ Write ,
83798381 /// Read session-level access.
83808382 ReadSession ,
83818383 /// References with optional column list.
@@ -8469,6 +8471,7 @@ impl fmt::Display for Action {
84698471 Action :: Ownership => f. write_str ( "OWNERSHIP" ) ?,
84708472 Action :: PurchaseDataExchangeListing => f. write_str ( "PURCHASE DATA EXCHANGE LISTING" ) ?,
84718473 Action :: Read => f. write_str ( "READ" ) ?,
8474+ Action :: Write => f. write_str ( "WRITE" ) ?,
84728475 Action :: ReadSession => f. write_str ( "READ SESSION" ) ?,
84738476 Action :: References { .. } => f. write_str ( "REFERENCES" ) ?,
84748477 Action :: Replicate => f. write_str ( "REPLICATE" ) ?,
@@ -8537,6 +8540,8 @@ pub enum ActionCreateObjectType {
85378540 Schema ,
85388541 /// A share object.
85398542 Share ,
8543+ /// A table object.
8544+ Table ,
85408545 /// A user object.
85418546 User ,
85428547 /// A warehouse object.
@@ -8563,6 +8568,7 @@ impl fmt::Display for ActionCreateObjectType {
85638568 ActionCreateObjectType :: Role => write ! ( f, "ROLE" ) ,
85648569 ActionCreateObjectType :: Schema => write ! ( f, "SCHEMA" ) ,
85658570 ActionCreateObjectType :: Share => write ! ( f, "SHARE" ) ,
8571+ ActionCreateObjectType :: Table => write ! ( f, "TABLE" ) ,
85668572 ActionCreateObjectType :: User => write ! ( f, "USER" ) ,
85678573 ActionCreateObjectType :: Warehouse => write ! ( f, "WAREHOUSE" ) ,
85688574 }
@@ -8895,6 +8901,46 @@ pub enum GrantObjects {
88958901 /// The target schema names.
88968902 schemas : Vec < ObjectName > ,
88978903 } ,
8904+ /// Grant privileges on `ALL SCHEMAS IN DATABASE <database_name> [, ...]`
8905+ AllSchemasInDatabase {
8906+ /// The target database names.
8907+ databases : Vec < ObjectName > ,
8908+ } ,
8909+ /// Grant privileges on `ALL TABLES IN DATABASE <database_name> [, ...]`
8910+ AllTablesInDatabase {
8911+ /// The target database names.
8912+ databases : Vec < ObjectName > ,
8913+ } ,
8914+ /// Grant privileges on `ALL STAGES IN SCHEMA <schema_name> [, ...]`
8915+ AllStagesInSchema {
8916+ /// The target schema names.
8917+ schemas : Vec < ObjectName > ,
8918+ } ,
8919+ /// Grant privileges on `ALL FILE FORMATS IN SCHEMA <schema_name> [, ...]`
8920+ AllFileFormatsInSchema {
8921+ /// The target schema names.
8922+ schemas : Vec < ObjectName > ,
8923+ } ,
8924+ /// Grant privileges on `FUTURE TABLES IN DATABASE <database_name> [, ...]`
8925+ FutureTablesInDatabase {
8926+ /// The target database names.
8927+ databases : Vec < ObjectName > ,
8928+ } ,
8929+ /// Grant privileges on `FUTURE STAGES IN SCHEMA <schema_name> [, ...]`
8930+ FutureStagesInSchema {
8931+ /// The target schema names.
8932+ schemas : Vec < ObjectName > ,
8933+ } ,
8934+ /// Grant privileges on `FUTURE FILE FORMATS IN SCHEMA <schema_name> [, ...]`
8935+ FutureFileFormatsInSchema {
8936+ /// The target schema names.
8937+ schemas : Vec < ObjectName > ,
8938+ } ,
8939+ /// Grant privileges on `FUTURE FUNCTIONS IN SCHEMA <schema_name> [, ...]`
8940+ FutureFunctionsInSchema {
8941+ /// The target schema names.
8942+ schemas : Vec < ObjectName > ,
8943+ } ,
88988944 /// Grant privileges on specific databases
88998945 Databases ( Vec < ObjectName > ) ,
89008946 /// Grant privileges on specific schemas
@@ -8913,6 +8959,10 @@ pub enum GrantObjects {
89138959 ResourceMonitors ( Vec < ObjectName > ) ,
89148960 /// Grant privileges on users
89158961 Users ( Vec < ObjectName > ) ,
8962+ /// Grant privileges on specific stages
8963+ Stages ( Vec < ObjectName > ) ,
8964+ /// Grant privileges on specific file formats
8965+ FileFormats ( Vec < ObjectName > ) ,
89168966 /// Grant privileges on compute pools
89178967 ComputePools ( Vec < ObjectName > ) ,
89188968 /// Grant privileges on connections
@@ -9056,12 +9106,74 @@ impl fmt::Display for GrantObjects {
90569106 display_comma_separated( schemas)
90579107 )
90589108 }
9109+ GrantObjects :: AllSchemasInDatabase { databases } => {
9110+ write ! (
9111+ f,
9112+ "ALL SCHEMAS IN DATABASE {}" ,
9113+ display_comma_separated( databases)
9114+ )
9115+ }
9116+ GrantObjects :: AllTablesInDatabase { databases } => {
9117+ write ! (
9118+ f,
9119+ "ALL TABLES IN DATABASE {}" ,
9120+ display_comma_separated( databases)
9121+ )
9122+ }
9123+ GrantObjects :: AllStagesInSchema { schemas } => {
9124+ write ! (
9125+ f,
9126+ "ALL STAGES IN SCHEMA {}" ,
9127+ display_comma_separated( schemas)
9128+ )
9129+ }
9130+ GrantObjects :: AllFileFormatsInSchema { schemas } => {
9131+ write ! (
9132+ f,
9133+ "ALL FILE FORMATS IN SCHEMA {}" ,
9134+ display_comma_separated( schemas)
9135+ )
9136+ }
9137+ GrantObjects :: FutureTablesInDatabase { databases } => {
9138+ write ! (
9139+ f,
9140+ "FUTURE TABLES IN DATABASE {}" ,
9141+ display_comma_separated( databases)
9142+ )
9143+ }
9144+ GrantObjects :: FutureStagesInSchema { schemas } => {
9145+ write ! (
9146+ f,
9147+ "FUTURE STAGES IN SCHEMA {}" ,
9148+ display_comma_separated( schemas)
9149+ )
9150+ }
9151+ GrantObjects :: FutureFileFormatsInSchema { schemas } => {
9152+ write ! (
9153+ f,
9154+ "FUTURE FILE FORMATS IN SCHEMA {}" ,
9155+ display_comma_separated( schemas)
9156+ )
9157+ }
9158+ GrantObjects :: FutureFunctionsInSchema { schemas } => {
9159+ write ! (
9160+ f,
9161+ "FUTURE FUNCTIONS IN SCHEMA {}" ,
9162+ display_comma_separated( schemas)
9163+ )
9164+ }
90599165 GrantObjects :: ResourceMonitors ( objects) => {
90609166 write ! ( f, "RESOURCE MONITOR {}" , display_comma_separated( objects) )
90619167 }
90629168 GrantObjects :: Users ( objects) => {
90639169 write ! ( f, "USER {}" , display_comma_separated( objects) )
90649170 }
9171+ GrantObjects :: Stages ( objects) => {
9172+ write ! ( f, "STAGE {}" , display_comma_separated( objects) )
9173+ }
9174+ GrantObjects :: FileFormats ( objects) => {
9175+ write ! ( f, "FILE FORMAT {}" , display_comma_separated( objects) )
9176+ }
90659177 GrantObjects :: ComputePools ( objects) => {
90669178 write ! ( f, "COMPUTE POOL {}" , display_comma_separated( objects) )
90679179 }
0 commit comments