Make GenericDialect support trailing commas in projections (#1921)

This commit is contained in:
Simon Vandel Sillesen 2025-07-06 08:57:20 +02:00 committed by GitHub
parent ed8757f2f0
commit cf9e50474e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -116,6 +116,10 @@ impl Dialect for GenericDialect {
true true
} }
fn supports_projection_trailing_commas(&self) -> bool {
true
}
fn supports_asc_desc_in_column_definition(&self) -> bool { fn supports_asc_desc_in_column_definition(&self) -> bool {
true true
} }

View file

@ -11184,7 +11184,7 @@ fn parse_trailing_comma() {
trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#); trailing_commas.verified_stmt(r#"SELECT "from" FROM "from""#);
// doesn't allow any trailing commas // doesn't allow any trailing commas
let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]); let trailing_commas = TestedDialects::new(vec![Box::new(PostgreSqlDialect {})]);
assert_eq!( assert_eq!(
trailing_commas trailing_commas