dineug / erd-editor

Entity-Relationship Diagram Editor
https://erd-editor.io
MIT License
940 stars 99 forks source link

[BUG | sql-ddl-parser] 'select' keyword "interrupts" parsing, preventing all fields after it to be ignored #294

Closed ShapourNemati closed 10 months ago

ShapourNemati commented 2 years ago

Hi, I have faced a bug when trying to parse the following valid ddl command

create table MY_TABLE (
  deptno        number,
  name          number,
  select        varchar2(50),
  anotherField  number,
  validName     number,
);

I would expect it to provide a create table statement with five columns: 'deptno', 'name', 'select', 'anotherField', and 'validName'. Instead, I have the following two columns: 'deptno', and 'name'.

I am using "@vuerd/sql-ddl-parser": "^0.2.2"

Sample code in interactive stackblitz (to reproduce you only need to execute the node keywordInterruptsParsing.js command in the terminal): https://stackblitz.com/edit/node-5mhfhv?file=keywordInterruptsParsing.js

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.