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

Oracle generated by default on null and primary key contraint #203

Closed jdobruchowski closed 4 months ago

jdobruchowski commented 1 year ago

Hello create table event_types ( id number constraint event_types_id_pk primary key ) ; and create table event_types ( id number generated by default on null as identity ) ;

unfortunately return empty array

those could also be written like this

create table event_types ( id number generated by default on null as identity constraint event_types_id_pk primary key ) ;

python 3.10.12 , v0.30.0

xnuinside commented 4 months ago

It was tooooo long but anyway )) I finally added support for Oracle's generated by & constraint with name in column def. Released in version 1.2.1, tests added - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/dialects/test_oracle.py#L838 if will be needed anything else, feel free to open new issue and thanks for opening that one.