Skip to content

Releases: sql-formatter-org/sql-formatter

14.0.0

21 Nov 08:31
Compare
Choose a tag to compare

Breaking changes

These already deprecated features were fundamentally broken and have been removed for good:

  • Removed tabulateAlias config option.
  • Removed commaPosition config option.

Potentially breaking:

  • The DB2 support has been completely overhauled. Previously it was a mix of features from DB2 for IBM z mainframe and DB2 for LUW (Linux, Unix, Windows). Now the dialect named "db2" specifically targets the LUW variant.
  • Snowflake dialect now includes all data types in the keywords list. Which means that when keywordCase: upper option is used, the data type names are also converted to uppercase. (#641)
  • The SqlLanguage type is no more just a plain string (a regression), but a union of the builtin SQL dialect names.
  • The DialectOptions type now includes a mandatory name field. (Relevant only when implementing a custom dialect.)

New features

  • New experimental identifierCase config option. This works similarly to the existing keywordCase option. (Thanks to Christian Jorgensen.)

Bugfixes

  • Various tweaks and fixes for the new DB2i dialect (introduced in 13.1.0).
  • Fixed formatting of TIMESTAMP() WITH TIME ZONE in PostgreSQL (#618)
  • Improved error messages from the parser to help users self-diagnose the most common issues.

13.1.0

10 Nov 09:56
Compare
Choose a tag to compare

New dialect

  • DB2 for IBM i (thanks to Christian Jorgensen) #658

Minor improvements

  • Support parameters inside schema.table.col syntax to facilitate its use as a workaround for SQL templating

13.0.4

01 Nov 09:08
Compare
Choose a tag to compare

Bugfix

  • Support repeated-quote escaping inside Postgres C-style strings (#655) (thanks to Christopher Manouvrier)

13.0.3

31 Oct 13:04
Compare
Choose a tag to compare

Bugfix

  • Fix crash with BETWEEN inside CASE expression #500 (Thanks to Zhongxian Liang)

13.0.2

25 Oct 08:25
Compare
Choose a tag to compare

Bugfixes

  • Fix detection of MySQL identifiers that start with number and contain unicode letters #651

13.0.1

23 Oct 15:22
Compare
Choose a tag to compare

Bugfixes

  • Support array slice operator in Postgres (#624)

13.0.0

01 Sep 11:06
Compare
Choose a tag to compare

Breaking changes

  • Reduced the keywords lists of MySQL, MariaDB and SingleStoreDB to just the reserved ones. #629
    This means that using keywordCase: upper no more capitalizes words like user and name.
  • Changed how COMMENT keyword is formatted. #636
    In dialects like MariaDB (which allow it inside CREATE TABLE statement) it is no more placed on a separate line.
    In dialects which support COMMENT ON ... statement, it only triggers a new line when used together with ON.

Bugfixes

  • Fixed crash when encountering goto labels in Transact-SQL #632
  • Fix formatting of ON DUPLICATE KEY UPDATE clause in MariaDB-like dialects. #605
  • Fix formatting of VALUES() function in MariaDB-like dialects. #605

12.2.4

23 Jul 12:02
Compare
Choose a tag to compare

Bugfix

  • Fix EAGAIN error when reading stdin (Thanks to @seblj #621)

12.2.3

14 Jun 09:51
Compare
Choose a tag to compare

Bugfixes

  • Add SELECT..INTO support for TSQL (#609) (thanks to Grant Forsythe)

12.2.2

09 Jun 06:17
Compare
Choose a tag to compare

Bugfixes

  • Improve handling of GO statements in Transact-SQL (#606) (thanks to Grant Forsythe)