@@ -3468,6 +3468,22 @@ pub enum Statement {
34683468 /// `<schema name> | AUTHORIZATION <schema authorization identifier> | <schema name> AUTHORIZATION <schema authorization identifier>`
34693469 schema_name : SchemaName ,
34703470 if_not_exists : bool ,
3471+ /// Schema options.
3472+ ///
3473+ /// ```sql
3474+ /// CREATE SCHEMA myschema OPTIONS(key1='value1');
3475+ /// ```
3476+ ///
3477+ /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement)
3478+ options : Option < Vec < SqlOption > > ,
3479+ /// Default collation specification for the schema.
3480+ ///
3481+ /// ```sql
3482+ /// CREATE SCHEMA myschema DEFAULT COLLATE 'und:ci';
3483+ /// ```
3484+ ///
3485+ /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement)
3486+ default_collate_spec : Option < Expr > ,
34713487 } ,
34723488 /// ```sql
34733489 /// CREATE DATABASE
@@ -5195,12 +5211,26 @@ impl fmt::Display for Statement {
51955211 Statement :: CreateSchema {
51965212 schema_name,
51975213 if_not_exists,
5198- } => write ! (
5199- f,
5200- "CREATE SCHEMA {if_not_exists}{name}" ,
5201- if_not_exists = if * if_not_exists { "IF NOT EXISTS " } else { "" } ,
5202- name = schema_name
5203- ) ,
5214+ options,
5215+ default_collate_spec,
5216+ } => {
5217+ write ! (
5218+ f,
5219+ "CREATE SCHEMA {if_not_exists}{name}" ,
5220+ if_not_exists = if * if_not_exists { "IF NOT EXISTS " } else { "" } ,
5221+ name = schema_name
5222+ ) ?;
5223+
5224+ if let Some ( collate) = default_collate_spec {
5225+ write ! ( f, " DEFAULT COLLATE {collate}" ) ?;
5226+ }
5227+
5228+ if let Some ( options) = options {
5229+ write ! ( f, " OPTIONS({})" , display_comma_separated( options) ) ?;
5230+ }
5231+
5232+ Ok ( ( ) )
5233+ }
52045234 Statement :: Assert { condition, message } => {
52055235 write ! ( f, "ASSERT {condition}" ) ?;
52065236 if let Some ( m) = message {
0 commit comments