mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-09 21:42:05 +00:00
Add support for CREATE SCHEMA WITH ( <properties> )
(#1877)
Some checks are pending
Rust / test (stable) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Some checks are pending
Rust / test (stable) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
This commit is contained in:
parent
84c3a1b325
commit
40d12b98bd
3 changed files with 23 additions and 0 deletions
|
@ -3725,6 +3725,14 @@ pub enum Statement {
|
|||
/// `<schema name> | AUTHORIZATION <schema authorization identifier> | <schema name> AUTHORIZATION <schema authorization identifier>`
|
||||
schema_name: SchemaName,
|
||||
if_not_exists: bool,
|
||||
/// Schema properties.
|
||||
///
|
||||
/// ```sql
|
||||
/// CREATE SCHEMA myschema WITH (key1='value1');
|
||||
/// ```
|
||||
///
|
||||
/// [Trino](https://trino.io/docs/current/sql/create-schema.html)
|
||||
with: Option<Vec<SqlOption>>,
|
||||
/// Schema options.
|
||||
///
|
||||
/// ```sql
|
||||
|
@ -5585,6 +5593,7 @@ impl fmt::Display for Statement {
|
|||
Statement::CreateSchema {
|
||||
schema_name,
|
||||
if_not_exists,
|
||||
with,
|
||||
options,
|
||||
default_collate_spec,
|
||||
} => {
|
||||
|
@ -5599,6 +5608,10 @@ impl fmt::Display for Statement {
|
|||
write!(f, " DEFAULT COLLATE {collate}")?;
|
||||
}
|
||||
|
||||
if let Some(with) = with {
|
||||
write!(f, " WITH ({})", display_comma_separated(with))?;
|
||||
}
|
||||
|
||||
if let Some(options) = options {
|
||||
write!(f, " OPTIONS({})", display_comma_separated(options))?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue