node-sql-parser icon indicating copy to clipboard operation
node-sql-parser copied to clipboard

Throws syntax error when trying to `astify` composite check constraints

Open 1ilit opened this issue 1 year ago • 0 comments

Describe the bug Throws syntax error when trying to astify composite check constraints

Database Engine MySQL

To Reproduce -the SQL that be parsed

CREATE TABLE `Pattern` (
  `IsInterpolated` INT NOT NULL,
  `Value` DOUBLE,
  CONSTRAINT `CHK_Value_IsInterpolated` CHECK ((`Value` IS NOT NULL) OR (`IsInterpolated` = 0))
);

-the node-sql-parser version v5.0.0 -the node version v18.18.0

Expected behavior Produce the ast for the constraint

Additional context Minimal reproducible example: https://stackblitz.com/edit/stackblitz-starters-9dpxty?file=index.js

1ilit avatar Apr 24 '24 14:04 1ilit