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

Ability to create sql statement from the DDLParser object. #207

Open Mathss opened 10 months ago

Mathss commented 10 months ago

Describe the solution you'd like This parser works great to deconstruct sql statement into the data structure.

It would be very useful to have a method do make the inverse. Construct the sql statement from the data strucutre. Like that we can manipulate and update the fields and properties to create updated statements.

xnuinside commented 10 months ago

@Mathss thanks for opening this issue, but to be honest, I didn't have any resources of this. Such functionality requiers changing full parser, because right now it is working in one side, with out mapping back to SQL query