simple-ddl-parser
simple-ddl-parser copied to clipboard
Support "& symbol"
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I have sql for initialize db and tables with tablespaces and functions. & symbol can be used in function - bit and operator and with "tablespace" keyword in Vertica - like "CREATE TABLE ... TABLESPACE &DATASPACE"
Describe the solution you'd like A clear and concise description of what you want to happen.
I think there are 2 options.
- Accept & symbol
- option parameter - ignore then continue to process
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
Thank you for your work.
Hi @kimjj81, thanks for reporting the issue! can you provide some more details: in what DB allowed & in sql ddl? Can you just send link to the documentation. It will be really helpful. And to DATASPACE - where is it used? In what db. Thank you!
Hi @xnuinside I have a legacy sql file to initialize DB - Vertica ( https://vertica.com/ ) In that file & used as below
DEFINE TS=&1
CREATE TABLE (.....) TABLESPACE &TS;
CREATE OR REPLACE FUNCTION ... $BODY$
DECLARE
SOME_EVENT RECORD;
EX VARCHAR(3);
BEGIN
......
IF OPTIONS&64 <> 0 THEN ........
Unfortunately, I don't know much about vertica, and I didn't find documents of 'TABLESPACE'.
Thanks for you reply.
@kimjj81 got it, thank you, I will work on it
@kimjj81 this issue was fixed in version 0.28.0. I tested on sample:
DEFINE TS=&1
CREATE TABLE table( `id` INT NOT NULL) TABLESPACE &TS;
it produces normal output.
If will be needed anything else - feel free to open new issue.
And sorry that its takes so much time :)