xnuinside / simple-ddl-parser

Simple DDL Parser to parse SQL (HQL, TSQL, AWS Redshift, BigQuery, Snowflake and other dialects) ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc. & table properties, types, domains, etc.
MIT License
179 stars 40 forks source link

Parse KEY statements within CREATE TABLE statements #219

Closed cfhowes closed 8 months ago

cfhowes commented 8 months ago

I have DDL with KEY statements as part of the CREATE TABLE statement. This is a seemingly valid way to indicate an index in SQL. I created a test case with a sample of the SQL I am working with, and the desired listing of an index.

I do not know the parser grammar all that well - it's possible that while the code works and passes the test cases that my implementation is not technically correct. Please give me pointers and I'll fix it up.

cfhowes commented 8 months ago

Looks like (after re-reading the contributing guidelines) that I also will need to update README.md and CHANGELOG.txt. I'll do this if I receive feedback that I'm on the right track here.

dmaresma commented 8 months ago

Hi, only update the CHANGELOG, the bash script (build.sh) 'll update the README.md, please can I ask you to run the flake8 .\simple_ddl_parser\ and fix the lint . Thanks for your contribution.

cfhowes commented 8 months ago

Thanks! Apologies for missing the flake8 check initially. Should be updated now.

xnuinside commented 8 months ago

@cfhowes merge conflict with main branch - need to resolve it. Please, get changes from main branch and re-run tests on your local machine to re-generate parsertab.py with your changes

xnuinside commented 8 months ago

@cfhowes released in version 0.31.3 https://pypi.org/project/simple-ddl-parser/