Releases: sql-formatter-org/sql-formatter
Releases · sql-formatter-org/sql-formatter
9.1.0
9.0.1
9.0.0
Breaking changes
- Removed
aliasAs
config option #371 - New approach to function call matching #140 see beta1 release notes for details
- Removed support for lots of questionable DB2 keywords #352
LIMIT
&OFFSET
keywords are no more supported in all dialects #362- Removed support for
CREATE TABLE
andDROP TABLE
from N1QL #364 - Several other smaller removals of unsupported syntax.
New features
Improvements
- Improved support for various BigQuery DDL statements (thanks to Ahmad Khan #319)
- Improved formatting of PL/SQL
tbl@dblink
syntax #338 - Added support for PL/SQL Q strings #342
- Improved Trino row pattern formatting #333
- Revised reserved keyword lists in multiple dialects #348
- Revised supported joins and set operations in multiple dialects #346
- Revised supported string types in multiple dialects #332
- Allow
#
as first char for Redshift identifiers #358 - Allow MySQL and MariaDB identifiers to begin with a number #339
- Improved formatting of
SELECT DISTINCT
#362 - Added support for several variations in SELECT query clauses (like
WITH RECURSIVE
in addition to plainWITH
) #362 - General overhaul of supported SQL syntax #362, #375, #369, #364
Bugfixes
- Fixed parameter substitution not working in
BETWEEN
expressions #318 - Fixed
BETWEEN..AND
formatting in tabular style #350 - Fixed double-quoted strings support for Spark #331
- Fixed multiword commands formatting with keywordCase:upper #356
- Fixed missing type-definition file when importing sql-formatter in TypeScript #353
- Fixed semicolon-on-separate-line bug #376
Internals:
- Utility for auto-generation of syntax variants #327
- Placed each
language.formatter.ts
file to separate directory and separated functions and keywords to separate files #315 - Removed
RESERVED_JOIN_CONDITION
token type. - Renamed
BINARY_COMMAND
toSET_OPERATION
#351 - Separated multi-word keywords from the rest #363
- Removed
.d.ts
file extensions #370
9.0.0-beta.7
Breaking changes:
- Removed
aliasAs
config option #371
Bugfixes:
- Fixed semicolon-on-separate-line bug #376
- Fixed SELECT clause detection (regression in previous beta) #372
Other changes:
- Revised supported data definition statements #375
- Revised supported data manipulation statements #369
- General review of supported SQL statements/clauses #364
Internal changes:
9.0.0-beta.6
Breaking changes
LIMIT
&OFFSET
keywords are no more supported in all dialects #362
Bugfixes
- Fix missing type-definition file when importing sql-formatter in TypeScript #353
Enhancements
- Allow
#
as first char for Redshift identifiers #358 - Allow MySQL and MariaDB identifiers to begin with a number #339
- Improved formatting of
SELECT DISTINCT
#362 - Added support for several variations in SELECT query clauses (like
WITH RECURSIVE
in addition to plainWITH
) #362 - General overhaul of query syntax support #362
9.0.0-beta.5
9.0.0-beta4
Bugfixes:
Enhancements:
- Improved formatting of PL/SQL
tbl@dblink
syntax #338 - Added support for PL/SQL Q strings #342
- Improved Trino row pattern formatting #333
- Revised reserved keyword lists in multiple dialects #348
- Revised supported joins and set operations in multiple dialects #346
- Revised supported string types in multiple dialects #332
Internals:
- Utility for auto-generation of syntax variants #327
9.0.0-beta3
9.0.0-beta2
Improvements
- Improved support for various BigQuery DDL statements (thanks to Ahmad Khan #319)
Bugfixes
- Fixed
aliasAs
option insertingAS
keywords to BigQuery functions #309 - Fixed parameter substitution not working in BETWEEN expressions #318
Internals
- Placed each
language.formatter.ts
file to separate directory and separated functions and keywords to separate files #315 - Removed
RESERVED_JOIN_CONDITION
token type.
9.0.0-beta1
New approach to function call matching
This release brings a major change to how function calls are detected:
- Only known builtin function names are now formatted like
TRIM()
- Any other function calls (e.g. user-defined functions) get formatted as
MY_FUNC ()
This fixes a long-standing problem where the format of input SQL effected output SQL. For example, if input contained TRIM ()
, then it was formatted as TRIM ()
and when it contained TRIM()
then it was formatted as TRIM()
. This in turn lead to problems where re-formatting an already formatted SQL could lead to different result. #140