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
183
stars
41
forks
source link
Issue #236: Updates to handle stand-alone UNIQUE and UNIQUE KEY statements #237
Updated parsing of UNIQUE and UNIQUE KEY clauses and statements. Now when multiple columns are specified in a UNIQUE clause/statement it will be treated as a compound UNIQUE statement and put in the constraints section of the parse dict. It also means that the individual columns will have unique=False since the individual column does not actually have a UNIQUE constraint. If I have done this correctly it will match the SQL spec more closely then before.
resolves #236
Updated parsing of
UNIQUE
andUNIQUE KEY
clauses and statements. Now when multiple columns are specified in aUNIQUE
clause/statement it will be treated as a compound UNIQUE statement and put in theconstraints
section of the parse dict. It also means that the individual columns will haveunique=False
since the individual column does not actually have a UNIQUE constraint. If I have done this correctly it will match the SQL spec more closely then before.