Skip to content

Releases: nene/sql-parser-cst

0.42.0

03 May 15:36

Choose a tag to compare

Breaking changes

  • Remove acceptUnsupportedGrammar option & drop UnsupportedGrammarStmt node (9007110)
  • Rename BlockStmt.declareClause to .declare (f7ab9e8)
  • Combine ExecuteIntoClause within IntoVariablesClause (e814b32, d3b73dc)
  • Move IntoVariablesClause to AllOtherClauses (8d7edca)
  • Parse EXECUTE in PL/pgSQL as ExecuteImmediateStmt (44e94b9)

PL/pgSQL parsing improvements

  • Support declaring aliases: .. ALIAS FOR ..
  • Support MERGE / DELETE / UPDATE / INSERT ... INTO variables
  • Support INTO STRICT
  • Parse INTO clause differently in PostgreSQL and PL/pgSQL
  • Support PERFORM-statement in PL/pgSQL (parsed as SELECT just with different keyword)

0.41.2

30 Apr 06:35

Choose a tag to compare

Bugfix

  • Add location info to empty program node inside DECLARE clause.

0.41.1

29 Apr 19:15

Choose a tag to compare

Bugfix

  • Add location info to empty program node.

0.41.0

27 Apr 17:09

Choose a tag to compare

New dialect

Experimental support for PL/pgSQL

Breaking changes

  • Rename error_category to error_bigquery (3f0bfae)
  • Extract the WHEN-part from ExceptionClause to separate clause (fd561a8)
  • Move AsClause<> from AllProcClauses to AllOtherClauses (a962a16)
  • Unify BigQuery & PL/pgSQL ASSERT statements (ac5c1aa)
  • Support RAISE USING option = value, ... (c0d49ce)
  • Support DECLARE block before BEGIN..END (6f31420)
  • Support <<label>> syntax in PL/pgSQL (3ca2558)

0.40.0

26 Apr 11:25

Choose a tag to compare

Reduce SQLite reserved keywords list.

Notable removals and their effects:

  • if can now be used as identifier name (as in the builtin if() function).
  • end can now be used as identifier name

0.39.0

05 Apr 10:50

Choose a tag to compare

Breaking changes

  • Support multiple names in DROP PROCEDURE & DROP FUNCTION (02cb895, cbd0e15)
  • Use FunctionSignature type in AlterProcedureStmt & AlterFunctionStmt (ebeae15, 88d220d)
  • Rename DropFunctionStmt.functions to .signatures (eac1972)
  • Don't recognize paren-less functions as plain function calls (15ada0f)

Other changes

  • Upgrade to TypeScript 5.x
  • Support SET as column name (but not as implicit alias)
  • Support interval units (year, month, ...) as column names

0.38.2

10 Jan 19:33

Choose a tag to compare

Bugfix

  • Fix interval expression parsing (#60)

0.38.1

16 Dec 21:51

Choose a tag to compare

Fix regression in previous release

  • Allow any expression in IntervalLiteral.value

0.38.0

15 Dec 19:51

Choose a tag to compare

Breaking changes to intervals parsing

  • Instead of parsing interval literals in PostgreSQL as IntervalLiteral and in other dialects as IntervalExpr, they are now always parsed as IntervalLiteral (175465f)
  • IntervalDataType properties fieldsKw and precision have been replaced with unit: IntervalUnit | IntervalUnitRange, making it more similar to IntervalLiteral (fc3f9e6)
  • Move IntervalUnit and IntervalUnitRange types have been moved from AllExprNodes to AllDataTypeNodes (2ae45dc)

Improved PostgreSQL intervals support

  • Support INTERVAL '15' SECOND (precision) literal syntax
  • Support INTERVAL (precision) '25' literal syntax

0.37.2

08 Dec 20:59

Choose a tag to compare

ARRAY[] is now parsed differently in BigQuery and PostgreSQL. #127

  • in BigQuery it's parsed as typed_expr as before.
  • in PostgreSQL it's now parsed as array_literal_expr.