-
DDL syntax allows for declaring a table name delimited by square brackets: When parsing this, what should the table name be? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@nurih yeah... it DDL in different dialects (at least that I saw for now) names can be in [], ``(bigquery), '', and "". Maybe make sense to add flag in parser like 'normalize_name' or smth like this and if this flag passed - remove [] from names. |
Beta Was this translation helpful? Give feedback.
-
I started to add table_name_delimiters output, but recognized that it will be not correct to use this field for whole table, because for example, this is valid statement: create table foo.[index] (col1 int); delimiters [ and ] used only in one name, but other without it so I just added 'normalize_names" flag - https://github.com/xnuinside/simple-ddl-parser/pull/114/files |
Beta Was this translation helpful? Give feedback.
I started to add table_name_delimiters output, but recognized that it will be not correct to use this field for whole table, because for example, this is valid statement:
create table foo.[index] (col1 int);
delimiters [ and ] used only in one name, but other without it
also this will be valid too:
create table foo.[index] ("col1" int);
so I just added 'normalize_names" flag - https://github.com/xnuinside/simple-ddl-parser/pull/114/files