simple-ddl-parser
simple-ddl-parser copied to clipboard
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....
Fail to parse Postgres CREATE TABLE statement with GENERATED ALWAYS AS IDENTITY(INCREMENT BY 1...)
Hello. **To Reproduce** ddl = """CREATE TABLE IF NOT EXISTS public.generator_id ( hall_id int4 GENERATED ALWAYS AS IDENTITY( INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START 1 CACHE 1 NO...
**Is your feature request related to a problem? Please describe.** It fails parsing INDEX and UNIQUE KEY of columns, within CREATE TABLE .... statements. Which should be valid, at least...
This one is more a feature request, as I don't think the parser supports this yet. This is for the ENUM column type when the values are specified inline. Relevant...
Parser fails when IDENTITY(1,1) comes after KEYs in column def. This fails: ``` create table Customer ( Id int PRIMARY KEY IDENTITY(1,1), ) ``` This works ``` create table Customer...
Found another one while testing out the lib, logging it here to keep track for now. Issue is with parsing composite primary keys with multiple columns ``` CREATE TABLE `TABLE_2`...
Hello, This Pull Request addresses the following two issues: Fix Issue #265: Problem Description: This resolves the bug reported in Issue #265. Solution: Identified the cause of the bug and...
## Is your feature request related to a problem? Please describe. Our database tables are set up with collate options, and due to these collate options, we always have to...
- Rewrite `find_first_unpair_closed_par` and `remove_par` implementations - Add new unit tests - Remove redundant (?) `SimpleDDLParserException` (it's better to discuss, backward compatibility may be broken) - Create a separate exception...
``` parse_results = DDLParser(""" CREATE TABLE `api_tokenbucket` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `value` VARCHAR(80), UNIQUE `constraint_name`( `value` ) ); """ , silent=False).run(output_mode='mysql') ``` The above fails to parse. It...
**Describe the bug** Actually, more of an annoyance instead of a bug. ``` CREATE TABLE pole.t_spiel ( id varchar(10) NOT NULL, -- Comment 0 refprodid varchar(10) NOT NULL, -- Comment...