Skip to content

Releases: nene/prettier-plugin-sql-cst

0.17.3

20 Dec 08:39

Choose a tag to compare

Parser upgrade

0.17.2

09 Dec 08:05

Choose a tag to compare

sqlTypeCase option improvement

  • ARRAY[] case is now effected in BigQuery by sqlTypeCase option, but not in PostgreSQL.
  • Upgrade to sql-parser-cst 0.37.2

0.17.1

07 Dec 20:40

Choose a tag to compare

Parser update

0.17.0

07 Dec 18:53

Choose a tag to compare

New features

  • Added sqlTypeCase option. (#13)
  • Added sqlIdentifierCase option. (#13)
  • Added sqlFunctionCase option. (#13)

Breaking changes

  • PostgreSQL builtin data type names are now formatted in upper case by default.
    While all other (custom) data types are treated as identifiers and left as-is by default.
    Recommended setting for PostgreSQL is sqlTypeCase: "lower", sqlIdentifierCase: "lower".
    This way all data types in PostgreSQL get formatted in uniform way.

Improvements and bugfixes

  • Improve formatting of DROP TABLE table1, table2, ... #58
  • Improve formatting of ANALYZE TABLE table1, table2, ...
  • Improve formatting of CREATE TABLE ... LIKE
  • Ensure CREATE PROCEDURE is formatted similarly to CREATE FUNCTION

0.16.0

18 Nov 10:32

Choose a tag to compare

Change in formatting

  • ADD CONSTRAINT in ALTER TABLE is now formatted like CONSTRAINT definitions in CREATE TABLE statement.

Before:

ALTER TABLE my_awesome_table
ADD CONSTRAINT some_constraint_name CHECK (
  my_awesome_table.column1 > my_awesome_table.column2
);

After:

ALTER TABLE my_awesome_table
ADD CONSTRAINT some_constraint_name
  CHECK (my_awesome_table.column1 > my_awesome_table.column2);

Other

0.15.0

15 Nov 19:31

Choose a tag to compare

Breaking changes

  • PostgreSQL data types are now treated as identifiers not keywords. So sqlKeywordCase option has no effect on these. In other dialects data types remain treated as keywords for now, but expect this to change in the future.

Improvements

  • Imroved PostgreSQL data types support added by sql-parser-cst 0.36.0:
    • SETOF types
    • schema-qualified type names

0.14.2

12 Nov 08:11

Choose a tag to compare

Parser update

0.14.1

10 Nov 19:00

Choose a tag to compare

Improvements

  • ON and OFF values in PostgreSQL SET statement are formatted as literals and respect the sqlLiteralCase option.
  • Support for PostgreSQL syntax introduced by sql-parser-cst 0.35.0:
    • COMMENT IN
    • CREATE/DROP SUBSCRIPTION
    • CREATE/DROP/ALTER PUBLICATION
    • CREATE/DROP EXTENSION
    • ALTER DEFAULT PRIVILEGES

0.14.0

26 Oct 19:24

Choose a tag to compare

New features

  • Added sqlLiteralCase option. (related to #13)
  • Support for new SQL syntax introduced by sql-parser-cst 0.34.0:
    • SET, RESET & SHOW statements of PostgreSQL
    • PREPARE, EXECUTE & DEALLOCATE statements of PostgreSQL, MySQL & MariaDB
    • CALL & DO statements of PostgreSQL

0.13.0

06 Apr 10:59

Choose a tag to compare

New features

  • Added sqlFinalSemicolon option. #50

Fixes and improvements

  • Fix formatting of plain CREATE SEQUENCE #48
  • Allow for one-line CREATE TABLE statements #46