@@ -3846,6 +3846,14 @@ pub enum Statement {
38463846 ///
38473847 /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement)
38483848 default_collate_spec : Option < Expr > ,
3849+ /// Clones a schema
3850+ ///
3851+ /// ```sql
3852+ /// CREATE SCHEMA myschema CLONE otherschema
3853+ /// ```
3854+ ///
3855+ /// [Snowflake](https://docs.snowflake.com/en/sql-reference/sql/create-clone#databases-schemas)
3856+ clone : Option < ObjectName > ,
38493857 } ,
38503858 /// ```sql
38513859 /// CREATE DATABASE
@@ -3855,6 +3863,14 @@ pub enum Statement {
38553863 if_not_exists : bool ,
38563864 location : Option < String > ,
38573865 managed_location : Option < String > ,
3866+ /// Clones a database
3867+ ///
3868+ /// ```sql
3869+ /// CREATE DATABASE mydb CLONE otherdb
3870+ /// ```
3871+ ///
3872+ /// [Snowflake](https://docs.snowflake.com/en/sql-reference/sql/create-clone#databases-schemas)
3873+ clone : Option < ObjectName > ,
38583874 } ,
38593875 /// ```sql
38603876 /// CREATE FUNCTION
@@ -4797,6 +4813,7 @@ impl fmt::Display for Statement {
47974813 if_not_exists,
47984814 location,
47994815 managed_location,
4816+ clone,
48004817 } => {
48014818 write ! ( f, "CREATE DATABASE" ) ?;
48024819 if * if_not_exists {
@@ -4809,6 +4826,9 @@ impl fmt::Display for Statement {
48094826 if let Some ( ml) = managed_location {
48104827 write ! ( f, " MANAGEDLOCATION '{ml}'" ) ?;
48114828 }
4829+ if let Some ( clone) = clone {
4830+ write ! ( f, " CLONE {clone}" ) ?;
4831+ }
48124832 Ok ( ( ) )
48134833 }
48144834 Statement :: CreateFunction ( create_function) => create_function. fmt ( f) ,
@@ -5730,6 +5750,7 @@ impl fmt::Display for Statement {
57305750 with,
57315751 options,
57325752 default_collate_spec,
5753+ clone,
57335754 } => {
57345755 write ! (
57355756 f,
@@ -5750,6 +5771,9 @@ impl fmt::Display for Statement {
57505771 write ! ( f, " OPTIONS({})" , display_comma_separated( options) ) ?;
57515772 }
57525773
5774+ if let Some ( clone) = clone {
5775+ write ! ( f, " CLONE {clone}" ) ?;
5776+ }
57535777 Ok ( ( ) )
57545778 }
57555779 Statement :: Assert { condition, message } => {
0 commit comments