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
175 stars 40 forks source link

Support functions with schema prefix #240

Closed kliushnichenko closed 4 months ago

kliushnichenko commented 4 months ago

Example

CREATE TABLE foo
(
    entity_id        UUID PRIMARY KEY DEFAULT public.getId(),
    name             VARCHAR(64),
    CONSTRAINT my_constraint  CHECK(v2.my_function(name) IS TRUE)
);

Currently, if the reference to the function contains schema (public. and v2. in the example above) parser returns an empty result.
Would be nice to support this case as well.