Skip to content

Releases: nene/sql-parser-cst

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.

0.37.1

07 Dec 20:22

Choose a tag to compare

New feature

Conditional comments to disable the parser for sections of SQL (#125)

SELECT * FROM foo;
/* sql-parser-cst-disable */
SOME PROBLEMATIC SQL;
/* sql-parser-cst-enable */
CREATE TABLE tbl (pos float8_range NOT NULL);

0.37.0

06 Dec 16:29

Choose a tag to compare

Breaking changes

Major changes to how data types are parsed:

  • named_data_type is now replaced with data_type_name and modified_data_type (309399d, 1605b6d)
  • INTERVAL types are now parsed as interval_data_type (fd1470d, b349053)
  • with_time_zone_data_type is now replaced with time_data_type (df42f4a, 5c3e587)
  • BigQuery parametric types are now parsed as parametric_data_type (3bc4388)
  • PostgreSQL builtin data type names are now parsed as keywords inside data_type_name. data_type_identifier node no more exists.
  • Other PostgreSQL data type names are parsed as identifiers.

Other changes

  • PostgreSQL NATIONAL CHAR data types are now supported.

0.36.1

18 Nov 10:20

Choose a tag to compare

Improved PostgreSQL support

  • Proper PostgreSQL operators support. Now recognizing any possibly operator instead of just a predefined list of the most well-known operators (#122, #79)
  • Support identifiers in PostgreSQL type modifiers, like GEOMETRY(POINT, 123) (#121)

0.36.0

15 Nov 18:46

Choose a tag to compare

Breaking changes

  • PostgreSQL data types are now parsed as identifiers (not keywords).
  • PostgreSQL data type names are now wrapped in data_type_identifier node.

Improved PostgreSQL data types support

  • Support schema-qualified type names #120
  • Support SETOF types #120

0.35.1

12 Nov 08:09

Choose a tag to compare

Bugfix

  • Add missing INTERVAL units for BigQuery #119

0.35.0

09 Nov 10:26

Choose a tag to compare

Improved PostgreSQL support

  • Support ON/OFF values in set_parameter_stmt
  • Support COMMENT ON
  • Support CREATE/DROP SUBSCRIPTION
  • Support CREATE/DROP/ALTER PUBLICATION
  • Support CREATE/DROP EXTENSION
  • Support ALTER DEFAULT PRIVILEGES
  • Support FULL [OUTER] JOIN

Improved types

  • Add missing Domain statements to Statement type

0.34.1

25 Oct 17:34

Choose a tag to compare

Add missing top-level exports for DO statement and PostgreSQL parameter node types.