Skip to content

Releases: nene/sql-parser-cst

0.31.1

24 Dec 09:43
Compare
Choose a tag to compare

Fixed keyword case-sensitivity bug (#100)

0.31.0

09 Dec 07:46
Compare
Choose a tag to compare

Breaking changes

  • Rename grant_stmt to grant_privilege_stmt, within which:
    • rename roles to privileges
    • rename users to roles
    • combine resouceType and resourceName to single field resource, referencing GrantResource node.
  • Rename revoke_stmt to revoke_privilege_stmt, within which:
    • rename roles to privileges
    • rename users to roles
    • combine resouceType and resourceName to single field resource, referencing GrantResource node.

Improved PostgreSQL support

  • Support GRANT
  • Support REVOKE
  • Support GRANT & CREATE TRIGGER inside CREATE SCHEMA
  • Support CREATE ROLE
  • Support ALTER ROLE
  • Support DROP ROLE
  • Support CREATE/ALTER/DROP GROUP as alias for ROLE
  • Support CREATE/ALTER/DROP USER as alias for ROLE
  • Support RESET ROLE
  • Support SET ROLE
  • Support ALTER TRIGGER
  • Support DROP TRIGGER
  • Support ALTER DOMAIN .. ADD CONSTRAINT NOT NULL
  • Support existing transaction syntax for PostgreSQL
  • Support END [TRANSACTION | WORK] in PostgreSQL
  • Support AND [NO] CHAIN in transactions

0.30.0

17 Nov 18:28
Compare
Choose a tag to compare

New features

  • Added acceptUnsupportedGrammar option. See README for details.

0.29.1

16 Nov 17:26
Compare
Choose a tag to compare

Expose DOMAIN and TYPE types as top-level exports.

0.29.0

16 Nov 16:46
Compare
Choose a tag to compare

Breaking changes

  • Renamed NamedDataType.nameKw field to .name (2b1e63b)
  • Changed the fields of CastOperatorExpr type: (ed61635)
    • expr -> left
    • dataType -> right
    • added operator field with single possible value "::"

PostgreSQL improvements:

  • Support CREATE/ALTER/DROP DOMAIN (fully) (#78)
  • Support CREATE/ALTER/DROP TYPE (partially) (#78)
  • Support chaining of multiple :: cast expressions (#85)
  • Support quoted identifiers as :: cast operator parameters (#85)

SQLite improvements:

  • Support COLUMN and KEY as identifiers in SQLite (#80)

Other fixes

  • Fix some mistakes in type definitions (#76)

0.28.1

05 Aug 07:30
Compare
Choose a tag to compare

Improvements

  • Support MySQL set syntax (thanks to YuMuuu) #81

Continuous integration improvements

  • Add Prettier check setting (thanks to YuMuuu) #83
  • Add Node 18 and 20 to CI (tanks to YuMuuu) #82

0.28.0

26 Mar 14:25
Compare
Choose a tag to compare

Breaking changes

  • Use TriggerEventExpr instead of plain TriggerEvent (d5ca16d)
  • Extract timeKw from TriggerEvent (9e0d309)
  • Extract TriggerTarget from TriggerEvent (d37a94b)
  • Rename TriggerCondition to WhenClause (7cd0758)
  • Replace CreateTriggerStmt.eachKw and .when fields with .clauses (56a69b4)
  • Don't parse unicode escapes in PostgreSQL unicode strings and identifiers (f715a15)

Improved PostgreSQL support

  • Support FILTER() in aggregate functions
  • Revert an accidental change to row_constructor syntax
  • Support PostgreSQL TRIGGER syntax:
    • Support CREATE TRIGGER
    • Support REFERENCING clause in TRIGGER
    • Support trigger timing clause
    • Support trigger FROM clause
    • Support FOR EACH clause
    • Support TRUNCATE event
  • Support ALTER PROCEDURE & ALTER FUNCTION
  • Support newline-separated strings, E'strings' and U&'strings'
  • Support UESCAPE in unicode strings & identifiers
  • Support underscores in number literals
  • Update keywords list for PostgreSQL 16 (add SYSTEM_USER)

0.27.1

13 Feb 19:44
Compare
Choose a tag to compare

New parameter type: $nr

  • The paramTypes option now accepts "$nr", to match parameters in the form of $1, $2, $3

0.27.0

07 Feb 16:32
Compare
Choose a tag to compare

Breaking changes

  • Various changes to AlterActionAddConstraint node to support BigQuery ADD CONSTRAINT IF NOT EXISTS syntax (72dadd1)
  • Moved ReindexStmt from AllSqliteNodes to AllIndexNodes (79b68c2)
  • Moved IndexSpecification from AllConstraintNodes to AllIndexNodes (2ba172f)
  • Moved IndexIncludeClause from AllConstraintNodes to AllIndexNodes to support INCLUDE (...) in CREATE INDEX (bde541a)
  • CreateIndexStmt.name field is now optional (e90647d)
  • The CreateViewStmt.columns field now contains list of ColumnDefinition nodes instead of just list of Identifier nodes. (1ba2459)

Support for latest BigQuery (as of 31. January 2024)

  • PRIMARY KEY constraint
  • FOREIGN KEY constraint
  • ALTER TABLE .. DROP PRIMARY KEY
  • ALTER TABLE .. DROP CONSTRAINT
  • NOT ENFORCED modifier in PRIMARY/FOREIGN KEY
  • ALTER TABLE .. ADD CONSTRAINT IF NOT EXISTS
  • ALTER VIEW .. ALTER COLUMN .. SET OPTIONS()
  • OPTIONS() in CREATE VIEW columns list
  • CREATE MATERIALIZED VIEW AS REPLICA OF
  • VECTOR_SEARCH() function
  • CREATE VECTOR INDEX
  • GROUPING() function
  • GROUP BY .. GROUPING SETS / CUBE / ROLLUP
  • quantified LIKE operator

Improved PostgreSQL support

  • CREATE INDEX statement
  • DROP INDEX statement
  • ALTER INDEX statement
  • REINDEX statement
  • Parameters for opclass (mainly in the context of CREATE INDEX)

0.26.0

03 Feb 14:16
Compare
Choose a tag to compare

Breaking changes

  • Replace TableKind, ViewKind and SequenceKind nodes with RelationKind.

Bugfixes

  • The above also fixes the issue of CreateViewStmt.kind field containing TableKind not ViewKind (#68)