Skip to content

Releases: nene/prettier-plugin-sql-cst

0.19.0

11 Apr 20:32

Choose a tag to compare

Parser upgrade

Other changes

  • Switch to TypeScript 5.x

0.18.0

19 Jan 07:49

Choose a tag to compare

New feature

  • The SQL code inside CREATE FUNCTION and CREATE PROCEDURE bodies now gets formatted. (#61) Thanks to @joelmukuthu
    This only applies when LANGUAGE sql is used in PostgreSQL.

0.17.4

10 Jan 19:34

Choose a tag to compare

Parser upgrade

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