mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
fmt fix
This commit is contained in:
parent
2e5f3562f0
commit
d9cc504c32
2 changed files with 8 additions and 6 deletions
|
@ -5193,24 +5193,24 @@ impl fmt::Display for Statement {
|
|||
server_type,
|
||||
version,
|
||||
fdw_name,
|
||||
options
|
||||
options,
|
||||
} => {
|
||||
write!(
|
||||
f,
|
||||
"CREATE SERVER {if_not_exists}{name} ",
|
||||
if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
|
||||
)?;
|
||||
|
||||
|
||||
if let Some(st) = server_type {
|
||||
write!(f, "TYPE {st} ")?;
|
||||
}
|
||||
|
||||
|
||||
if let Some(v) = version {
|
||||
write!(f, "VERSION {v} ")?;
|
||||
}
|
||||
|
||||
|
||||
write!(f, "FOREIGN DATA WRAPPER {fdw_name}")?;
|
||||
|
||||
|
||||
if let Some(o) = options {
|
||||
write!(f, " OPTIONS ({o})", o = display_comma_separated(o))?;
|
||||
}
|
||||
|
|
|
@ -4662,7 +4662,9 @@ impl<'a> Parser<'a> {
|
|||
self.parse_create_procedure(or_alter)
|
||||
} else if self.parse_keyword(Keyword::CONNECTOR) {
|
||||
self.parse_create_connector()
|
||||
} else if self.parse_keyword(Keyword::SERVER) && dialect_of!(self is PostgreSqlDialect | GenericDialect) {
|
||||
} else if self.parse_keyword(Keyword::SERVER)
|
||||
&& dialect_of!(self is PostgreSqlDialect | GenericDialect)
|
||||
{
|
||||
self.parse_pg_create_server()
|
||||
} else {
|
||||
self.expected("an object type after CREATE", self.peek_token())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue