@@ -3450,6 +3450,22 @@ pub enum Statement {
34503450 /// `<schema name> | AUTHORIZATION <schema authorization identifier> | <schema name> AUTHORIZATION <schema authorization identifier>`
34513451 schema_name : SchemaName ,
34523452 if_not_exists : bool ,
3453+ /// Schema options.
3454+ ///
3455+ /// ```sql
3456+ /// CREATE SCHEMA myschema OPTIONS(key1='value1');
3457+ /// ```
3458+ ///
3459+ /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement)
3460+ options : Option < Vec < SqlOption > > ,
3461+ /// Default collation specification for the schema.
3462+ ///
3463+ /// ```sql
3464+ /// CREATE SCHEMA myschema DEFAULT COLLATE 'und:ci';
3465+ /// ```
3466+ ///
3467+ /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement)
3468+ default_collate_spec : Option < Expr > ,
34533469 } ,
34543470 /// ```sql
34553471 /// CREATE DATABASE
@@ -5177,12 +5193,26 @@ impl fmt::Display for Statement {
51775193 Statement :: CreateSchema {
51785194 schema_name,
51795195 if_not_exists,
5180- } => write ! (
5181- f,
5182- "CREATE SCHEMA {if_not_exists}{name}" ,
5183- if_not_exists = if * if_not_exists { "IF NOT EXISTS " } else { "" } ,
5184- name = schema_name
5185- ) ,
5196+ options,
5197+ default_collate_spec,
5198+ } => {
5199+ write ! (
5200+ f,
5201+ "CREATE SCHEMA {if_not_exists}{name}" ,
5202+ if_not_exists = if * if_not_exists { "IF NOT EXISTS " } else { "" } ,
5203+ name = schema_name
5204+ ) ?;
5205+
5206+ if let Some ( collate) = default_collate_spec {
5207+ write ! ( f, " DEFAULT COLLATE {collate}" ) ?;
5208+ }
5209+
5210+ if let Some ( options) = options {
5211+ write ! ( f, " OPTIONS({})" , display_comma_separated( options) ) ?;
5212+ }
5213+
5214+ Ok ( ( ) )
5215+ }
51865216 Statement :: Assert { condition, message } => {
51875217 write ! ( f, "ASSERT {condition}" ) ?;
51885218 if let Some ( m) = message {
0 commit comments