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
183 stars 41 forks source link

Column comments into dicts #269

Open erwin-frohsinn opened 3 months ago

erwin-frohsinn commented 3 months ago

Is your feature request related to a problem? Please describe. Comments on Columns like the following are parsed, but into a list instead of a dict with column name as key: comment on column pole.t_spiel.refprodid is 'Verweis auf die Produktion';

Describe the solution you'd like All column related comments should be parsed into a dict, e.g.: {'pole.t_spiel.refprodid': 'Verweis auf die Produktion';', ...}

xnuinside commented 2 months ago

@erwin-frohsinn, thanks for opening this issue. Sorry for the long delay with replay, I will try to take look on it soon as possible. As I understand you talk about statements like this https://postgrespro.ru/docs/postgresql/9.4/sql-comment?