Releases: nene/prettier-plugin-sql-cst
Releases · nene/prettier-plugin-sql-cst
0.17.3
0.17.2
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
Parser update
- Upgrade to sql-parser-cst 0.37.1
0.17.0
New features
- Added
sqlTypeCaseoption. (#13) - Added
sqlIdentifierCaseoption. (#13) - Added
sqlFunctionCaseoption. (#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 issqlTypeCase: "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 PROCEDUREis formatted similarly toCREATE FUNCTION
0.16.0
Change in formatting
ADD CONSTRAINTinALTER TABLEis now formatted likeCONSTRAINTdefinitions inCREATE TABLEstatement.
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
- PostgreSQL parsing improvements from sql-parser-cst 0.36.1.
0.15.0
Breaking changes
- PostgreSQL data types are now treated as identifiers not keywords. So
sqlKeywordCaseoption 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:
SETOFtypes- schema-qualified type names
0.14.2
Parser update
- Upgrade to sql-parser-cst 0.35.1
0.14.1
Improvements
ONandOFFvalues in PostgreSQLSETstatement are formatted as literals and respect thesqlLiteralCaseoption.- Support for PostgreSQL syntax introduced by sql-parser-cst 0.35.0:
COMMENT INCREATE/DROP SUBSCRIPTIONCREATE/DROP/ALTER PUBLICATIONCREATE/DROP EXTENSIONALTER DEFAULT PRIVILEGES
0.14.0
New features
- Added
sqlLiteralCaseoption. (related to #13) - Support for new SQL syntax introduced by sql-parser-cst 0.34.0:
SET,RESET&SHOWstatements of PostgreSQLPREPARE,EXECUTE&DEALLOCATEstatements of PostgreSQL, MySQL & MariaDBCALL&DOstatements of PostgreSQL