@@ -59,16 +59,16 @@ pub use self::dcl::{
5959} ;
6060pub use self :: ddl:: {
6161 AlterColumnOperation , AlterConnectorOwner , AlterIndexOperation , AlterPolicyOperation ,
62- AlterTableAlgorithm , AlterTableLock , AlterTableOperation , AlterType , AlterTypeAddValue ,
63- AlterTypeAddValuePosition , AlterTypeOperation , AlterTypeRename , AlterTypeRenameValue ,
64- ClusteredBy , ColumnDef , ColumnOption , ColumnOptionDef , ColumnOptions , ColumnPolicy ,
65- ColumnPolicyProperty , ConstraintCharacteristics , CreateConnector , CreateDomain , CreateFunction ,
66- Deduplicate , DeferrableInitial , DropBehavior , GeneratedAs , GeneratedExpressionMode ,
67- IdentityParameters , IdentityProperty , IdentityPropertyFormatKind , IdentityPropertyKind ,
68- IdentityPropertyOrder , IndexOption , IndexType , KeyOrIndexDisplay , NullsDistinctOption , Owner ,
69- Partition , ProcedureParam , ReferentialAction , ReplicaIdentity , TableConstraint ,
70- TagsColumnOption , UserDefinedTypeCompositeAttributeDef , UserDefinedTypeRepresentation ,
71- ViewColumnDef ,
62+ AlterSchemaOperation , AlterTableAlgorithm , AlterTableLock , AlterTableOperation , AlterType ,
63+ AlterTypeAddValue , AlterTypeAddValuePosition , AlterTypeOperation , AlterTypeRename ,
64+ AlterTypeRenameValue , ClusteredBy , ColumnDef , ColumnOption , ColumnOptionDef , ColumnOptions ,
65+ ColumnPolicy , ColumnPolicyProperty , ConstraintCharacteristics , CreateConnector , CreateDomain ,
66+ CreateFunction , Deduplicate , DeferrableInitial , DropBehavior , GeneratedAs ,
67+ GeneratedExpressionMode , IdentityParameters , IdentityProperty , IdentityPropertyFormatKind ,
68+ IdentityPropertyKind , IdentityPropertyOrder , IndexOption , IndexType , KeyOrIndexDisplay ,
69+ NullsDistinctOption , Owner , Partition , ProcedureParam , ReferentialAction , ReplicaIdentity ,
70+ TableConstraint , TagsColumnOption , UserDefinedTypeCompositeAttributeDef ,
71+ UserDefinedTypeRepresentation , ViewColumnDef ,
7272} ;
7373pub use self :: dml:: { CreateIndex , CreateTable , Delete , IndexColumn , Insert } ;
7474pub use self :: operator:: { BinaryOperator , UnaryOperator } ;
@@ -3381,6 +3381,17 @@ pub enum Statement {
33813381 iceberg : bool ,
33823382 } ,
33833383 /// ```sql
3384+ /// ALTER SCHEMA
3385+ /// ```
3386+ /// See [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_schema_collate_statement)
3387+ AlterSchema {
3388+ /// Schema name
3389+ #[ cfg_attr( feature = "visitor" , visit( with = "visit_relation" ) ) ]
3390+ name : ObjectName ,
3391+ if_exists : bool ,
3392+ operations : Vec < AlterSchemaOperation > ,
3393+ } ,
3394+ /// ```sql
33843395 /// ALTER INDEX
33853396 /// ```
33863397 AlterIndex {
@@ -6199,6 +6210,15 @@ impl fmt::Display for Statement {
61996210 Statement :: List ( command) => write ! ( f, "LIST {command}" ) ,
62006211 Statement :: Remove ( command) => write ! ( f, "REMOVE {command}" ) ,
62016212 Statement :: CreateUser ( s) => write ! ( f, "{s}" ) ,
6213+ Statement :: AlterSchema {
6214+ name, operations, ..
6215+ } => {
6216+ write ! ( f, "ALTER SCHEMA {name}" ) ?;
6217+ for operation in operations {
6218+ write ! ( f, " {operation}" ) ?;
6219+ }
6220+ Ok ( ( ) )
6221+ }
62026222 }
62036223 }
62046224}
0 commit comments