-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parser skips tables containing indexes with > 2 included columns #180
Comments
@mrmonkington hi, thanks for reporting the issue, I think problem in statement KEY, because it is usually PRIMARY KEY (https://www.w3schools.com/sql/sql_primarykey.ASP ). Can you share a doc for DB where is KEY used? Without PRIMARY in output you can see, that KEY was recognized as a column, not a valid statement {'check': None, |
Hi @xnuinside Yes I just noticed myself that the parser was interpreting it a regular column of type However MySQL allows
Hope that helps! |
got it, I will add support for this statement |
@xnuinside I have noticed that neither I would really like to help implement this, but I am unsure what the output should look like for the purposes of writing some tests. Please can you confirm for me that it would be correct if an inline index of form:
...would output the same parsed form as:
i.e.
? Thank you! |
@mrmonkington Can you check if this now works after #219 was merged (0.31.3 and later)? I was using MySQL as well and patched up some key parsing. not sure if i fully got your cases though. |
everything works (all samples from issue) on 1.3.1 version, tested, I will close the issues, if needed something else - feel free to open |
Describe the bug
simple-ddl-parser==0.29.0
The parser seems to ignore any table with a multicolumn index where the number of included cols > 2.
To Reproduce
Sample program
test.py
:Input file
input.sql
:Outputs:
Note that
a2
is not present.Expected behavior
Two entries in the
tables
list, e.g.:Environment:
simple-ddl-parser==0.29.0
The text was updated successfully, but these errors were encountered: