File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ pub enum DataType {
51
51
/// [MsSQL]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16#c-create-a-multi-statement-table-valued-function
52
52
Table ( Option < Vec < ColumnDef > > ) ,
53
53
/// Table type with a name, e.g. CREATE FUNCTION RETURNS @result TABLE(...).
54
- NamedTable (
54
+ NamedTable {
55
55
/// Table name.
56
- ObjectName ,
56
+ name : ObjectName ,
57
57
/// Table columns.
58
- Vec < ColumnDef > ,
59
- ) ,
58
+ columns : Vec < ColumnDef > ,
59
+ } ,
60
60
/// Fixed-length character type, e.g. CHARACTER(10).
61
61
Character ( Option < CharacterLength > ) ,
62
62
/// Fixed-length char type, e.g. CHAR(10).
@@ -732,8 +732,8 @@ impl fmt::Display for DataType {
732
732
write ! ( f, "TABLE" )
733
733
}
734
734
} ,
735
- DataType :: NamedTable ( name, fields ) => {
736
- write ! ( f, "{} TABLE ({})" , name, display_comma_separated( fields ) )
735
+ DataType :: NamedTable { name, columns } => {
736
+ write ! ( f, "{} TABLE ({})" , name, display_comma_separated( columns ) )
737
737
}
738
738
DataType :: GeometricType ( kind) => write ! ( f, "{}" , kind) ,
739
739
}
Original file line number Diff line number Diff line change @@ -5241,10 +5241,10 @@ impl<'a> Parser<'a> {
5241
5241
)?,
5242
5242
};
5243
5243
5244
- Ok(DataType::NamedTable(
5245
- ObjectName(vec![ObjectNamePart::Identifier(return_table_name)]),
5246
- table_column_defs,
5247
- ) )
5244
+ Ok(DataType::NamedTable {
5245
+ name: ObjectName(vec![ObjectNamePart::Identifier(return_table_name)]),
5246
+ columns: table_column_defs,
5247
+ } )
5248
5248
})?;
5249
5249
5250
5250
let return_type = if return_table.is_some() {
You can’t perform that action at this time.
0 commit comments