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

SQLServer varchar with (max) not handled #187

Closed ctimmer closed 1 year ago

ctimmer commented 1 year ago

Describe the bug With this column declaration:

[object_def] [varchar](max) NULL,

the (max) is interpreted as '()'

Expected behavior Would like to see it passed through as '(max)'

Desktop (please complete the following information):

xnuinside commented 1 year ago

@ctimmer , hi! this issue was fixed in some of the latest versions, at least I have already for this test - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/dialects/test_mssql_specific.py#L138 and it is parsed validly on version 0.29.1. please try, if there is still issue - reopen it and provide a full example please. And thank you!