mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
fdw_name -> foreign_data_wrapper + fmt fix
This commit is contained in:
parent
cd78c51bfe
commit
1b916b8781
3 changed files with 9 additions and 10 deletions
|
@ -3324,7 +3324,7 @@ pub enum Statement {
|
|||
if_not_exists: bool,
|
||||
server_type: Option<Ident>,
|
||||
version: Option<Ident>,
|
||||
fdw_name: ObjectName,
|
||||
foreign_data_wrapper: ObjectName,
|
||||
options: Option<Vec<ServerOption>>,
|
||||
},
|
||||
/// ```sql
|
||||
|
@ -5192,7 +5192,7 @@ impl fmt::Display for Statement {
|
|||
if_not_exists,
|
||||
server_type,
|
||||
version,
|
||||
fdw_name,
|
||||
foreign_data_wrapper,
|
||||
options,
|
||||
} => {
|
||||
write!(
|
||||
|
@ -5209,7 +5209,7 @@ impl fmt::Display for Statement {
|
|||
write!(f, "VERSION {v} ")?;
|
||||
}
|
||||
|
||||
write!(f, "FOREIGN DATA WRAPPER {fdw_name}")?;
|
||||
write!(f, "FOREIGN DATA WRAPPER {foreign_data_wrapper}")?;
|
||||
|
||||
if let Some(o) = options {
|
||||
write!(f, " OPTIONS ({o})", o = display_comma_separated(o))?;
|
||||
|
|
|
@ -4662,8 +4662,7 @@ 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)
|
||||
{
|
||||
} else if self.parse_keyword(Keyword::SERVER) {
|
||||
self.parse_pg_create_server()
|
||||
} else {
|
||||
self.expected("an object type after CREATE", self.peek_token())
|
||||
|
@ -15833,7 +15832,7 @@ impl<'a> Parser<'a> {
|
|||
};
|
||||
|
||||
self.expect_keywords(&[Keyword::FOREIGN, Keyword::DATA, Keyword::WRAPPER])?;
|
||||
let fdw_name = self.parse_object_name(false)?;
|
||||
let foreign_data_wrapper = self.parse_object_name(false)?;
|
||||
|
||||
let mut options = None;
|
||||
if self.parse_keyword(Keyword::OPTIONS) {
|
||||
|
@ -15851,7 +15850,7 @@ impl<'a> Parser<'a> {
|
|||
if_not_exists: ine,
|
||||
server_type,
|
||||
version,
|
||||
fdw_name,
|
||||
foreign_data_wrapper,
|
||||
options,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6241,7 +6241,7 @@ fn parse_create_server() {
|
|||
if_not_exists: false,
|
||||
server_type: None,
|
||||
version: None,
|
||||
fdw_name: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
foreign_data_wrapper: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
options: None,
|
||||
}
|
||||
);
|
||||
|
@ -6261,7 +6261,7 @@ fn parse_create_server() {
|
|||
quote_style: Some('\''),
|
||||
span: Span::empty(),
|
||||
}),
|
||||
fdw_name: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
foreign_data_wrapper: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
options: None,
|
||||
}
|
||||
);
|
||||
|
@ -6273,7 +6273,7 @@ fn parse_create_server() {
|
|||
if_not_exists: false,
|
||||
server_type: None,
|
||||
version: None,
|
||||
fdw_name: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
foreign_data_wrapper: ObjectName::from(vec!["postgres_fdw".into()]),
|
||||
options: Some(vec![
|
||||
ServerOption {
|
||||
key: "host".into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue