Skip to content

12.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@nene nene released this 11 Oct 16:55
· 451 commits to master since this release

Major formatting style change

Most of the simple statements are now formatted more so on one line (#483).

For example the following SQL, previously formatted as follows:

ALTER TABLE
  foo
ALTER COLUMN
  col1
SET DEFAULT
  10;

DROP TABLE
  my_tbl;

DELETE FROM
  customers
WHERE
  age > 99;

UPDATE
  orders
SET
  price = 0,
  total = 0
WHERE
  deleted = TRUE;

will now be formatted on a single line:

ALTER TABLE foo
ALTER COLUMN col1
SET DEFAULT 10;

DROP TABLE my_tbl;

DELETE FROM customers
WHERE
  age > 99;

UPDATE orders
SET
  price = 0,
  total = 0
WHERE
  deleted = TRUE;

Breaking change in extension API

Instead of extending the Formatter class, there's now a DialectOptions object (#493).
This object can now be supplied to language parameter to implement a custom SQL dialect.

Bugfixes

  • Support nested CASE expressions (#494)
  • The MySQL USE keyword formatting should no more cause syntax error (#456)