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

Add TRUNCATE #190

Open mmoldrup opened 1 year ago

mmoldrup commented 1 year ago

The parser doesn't accept TRUNCATE as a DDL-statement.

xnuinside commented 1 year ago

@mmoldrup hi, truncate statements are skipped same way as 'drop' statements and just not produces any results. What result as an output you expect? something like 'truncate': {'schema': 'schema_name', 'table_name': 'table_name'}?

mmoldrup commented 1 year ago

Yes, in my case I just need to extract all affected tables. I would be able to do that, if what you suggest was included. Same goes for ‘drop’ and similar expressions.

Br, Michael

ons. 29. mar. 2023 kl. 19.59 skrev Iuliia Volkova @.***

:

@mmoldrup https://github.com/mmoldrup hi, truncate statements are skipped same way as 'drop' statements and just not produces any results. What result as an output you expect? something like 'truncate': {'schema': 'schema_name', 'table_name': 'table_name'}?

— Reply to this email directly, view it on GitHub https://github.com/xnuinside/simple-ddl-parser/issues/190#issuecomment-1489058603, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANISD5RGEASKK3T5ZF4MWNLW6R2BHANCNFSM6AAAAAAUSJTYPQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Mvh./Best regards, Michael Møldrup