node-sql-parser
node-sql-parser copied to clipboard
Throws syntax error when trying to `astify` composite check constraints
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