taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
798 stars 180 forks source link

Support CHECK constraints in PostgreSQL #1967

Closed 1ilit closed 3 months ago

1ilit commented 3 months ago

Support parsing CHECK constraints on column definitions

Database Engine PostgreSQL

To Reproduce -the SQL that be parsed

CREATE TABLE Books (price DECIMAL(10, 2) CHECK (Price > 0));

-the node-sql-parser version v5.2.0 -the node version v18.20.3

Expected behavior Produce ast