Skip to content

Releases: sql-formatter-org/sql-formatter

10.2.0

01 Sep 11:13
Compare
Choose a tag to compare

Bugfixes

  • Fix formatting of TIMESTAMP WITH TIME ZONE in PostgreSQL #391
  • Fix formatting of FOR UPDATE clause in PL/SQL #340

Internal changes

  • Reduce coupling between Tokenizer and TokenizerEngine #416

10.1.1

01 Sep 05:58
Compare
Choose a tag to compare

Bugfixes

  • Fix crash caused by ROWS BETWEEN in window definitions #417 #415

10.1.0

31 Aug 10:53
Compare
Choose a tag to compare

Improvements

  • Add support for @@variables in MariaDB, MySQL, SingleStoreDB #410
  • Remove support of prefixes from double-quoted strings inMariaDB, MySQL, SingleStoreDB (shouldn't break unless you're for some reason formatting invalid code) #408

Bugfixes

  • Fix tabular style formatting of LIMIT clause #412

Internal changes

  • Remove unnecessary type imports, improving compatibility with older TypeScript versions #404
  • Remove Tokens from AST #403

10.0.0

25 Aug 08:21
Compare
Choose a tag to compare

Breaking changes

  • Encountering braces {} or brackets [] in SQL dialect not supporting these will now throw error #400
  • Encountering unbalanced parenthesis () (also {} and []) will now produce an error #277

Performance

  • Tokenizer is now faster, thanks to removal of case-insensitive regex transform #394
  • Parser is now slower, because of the switch to nearley #277
  • Overall performance is more impacted by the parser, so the net result is a slower formatting. Though this should only affect you if you're formatting megabytes worth of SQL.

Internal changes

  • Switch from hand-written parser to Nearley parser-generator #277
  • Added more token types #398 #395
  • Replace open- and closeParens configs with extraParens #405

10.0.0-beta.1

22 Aug 13:59
Compare
Choose a tag to compare
10.0.0-beta.1 Pre-release
Pre-release

Breaking changes

  • Encountering braces {} or brackets [] in SQL dialect not supporting these will now throw error #400
  • Encountering unbalanced parenthesis () (also {} and []) will now produce an error #277

Performance

  • Tokenizer is now faster, thanks to removal of case-insensitive regex transform #394
  • Parser is now slower, because of the switch to nearley #277
  • Overall performance is more impacted by the parser, so the net result is a slower formatting. Though this should only effect you if you're formatting megabytes worth of SQL.

Internal changes

  • Switch from hand-written parser to Nearley parser-generator #277
  • Added more token types #398 #395

9.2.0

15 Aug 16:37
Compare
Choose a tag to compare

New features:

  • Added paramTypes config option to allow user-configured parameter placeholder types #367
  • Extended language option to allow for passing in a user-defined Formatter class #306

Improvements:

  • Better handling of line-comments, preserving their position either at the end of line or between lines #365

9.1.0

11 Aug 20:13
Compare
Choose a tag to compare

New features

  • New SQL dialect: SingleStoreDB (thanks to Michael Giannakopoulos) #387 #379

Improvements

  • An error is now thrown when the aliasAs config (removed in 9.0.0) is used #389

9.0.1

11 Aug 09:31
Compare
Choose a tag to compare

Bugfixes:

  • Fix set operations indentation in tabular style #383

Internals:

  • Add location info to tokens #374

9.0.0

08 Aug 19:11
Compare
Choose a tag to compare

Breaking changes

  • Removed aliasAs config option #371
  • New approach to function call matching #140 see beta1 release notes for details
  • Removed support for lots of questionable DB2 keywords #352
  • LIMIT & OFFSET keywords are no more supported in all dialects #362
  • Removed support for CREATE TABLE and DROP TABLE from N1QL #364
  • Several other smaller removals of unsupported syntax.

New features

  • New SQL dialect: Trino (Thanks for the work of Boris Verkhovskiy #325 #297 )

Improvements

  • Improved support for various BigQuery DDL statements (thanks to Ahmad Khan #319)
  • Improved formatting of PL/SQL tbl@dblink syntax #338
  • Added support for PL/SQL Q strings #342
  • Improved Trino row pattern formatting #333
  • Revised reserved keyword lists in multiple dialects #348
  • Revised supported joins and set operations in multiple dialects #346
  • Revised supported string types in multiple dialects #332
  • Allow # as first char for Redshift identifiers #358
  • Allow MySQL and MariaDB identifiers to begin with a number #339
  • Improved formatting of SELECT DISTINCT #362
  • Added support for several variations in SELECT query clauses (like WITH RECURSIVE in addition to plain WITH) #362
  • General overhaul of supported SQL syntax #362, #375, #369, #364

Bugfixes

  • Fixed parameter substitution not working in BETWEEN expressions #318
  • Fixed BETWEEN..AND formatting in tabular style #350
  • Fixed double-quoted strings support for Spark #331
  • Fixed multiword commands formatting with keywordCase:upper #356
  • Fixed missing type-definition file when importing sql-formatter in TypeScript #353
  • Fixed semicolon-on-separate-line bug #376

Internals:

  • Utility for auto-generation of syntax variants #327
  • Placed each language.formatter.ts file to separate directory and separated functions and keywords to separate files #315
  • Removed RESERVED_JOIN_CONDITION token type.
  • Renamed BINARY_COMMAND to SET_OPERATION #351
  • Separated multi-word keywords from the rest #363
  • Removed .d.ts file extensions #370

9.0.0-beta.7

07 Aug 16:25
Compare
Choose a tag to compare
9.0.0-beta.7 Pre-release
Pre-release

Breaking changes:

  • Removed aliasAs config option #371

Bugfixes:

  • Fixed semicolon-on-separate-line bug #376
  • Fixed SELECT clause detection (regression in previous beta) #372

Other changes:

  • Revised supported data definition statements #375
  • Revised supported data manipulation statements #369
  • General review of supported SQL statements/clauses #364

Internal changes:

  • Separated multi-word keywords from the rest #363
  • Removed .d.ts file extensions #370