generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Quoted identifiers example from small_tests.js:
output = quicksql.toDDL(
`"Test"
"CamelCase"
x [coMment]
2 --coMment2
`);
//console.log(output);
assert( " 0 < output.indexOf('create table \"Test\"') " );
//assert( " 0 < output.indexOf('Test_id_pk') " );
assert( " 0 < output.indexOf('\"CamelCase\"') " );
assert( " 0 < output.indexOf('comment on column \"Test\".x is ') " );
assert( " 0 < output.indexOf('comment on column \"Test\".x2 is ') " );
The second, commented out assertion is broken. The full output is:
create table "Test" (
id number generated by default on null as identity
constraint "Test"_id_pk primary key, -- broken
"CamelCase" varchar2(4000 char),
x varchar2(4000 char),
x2 varchar2(4000 char)
);
comment on column "Test".x is 'coMment';
Presumably, there is a bug everywhere in the code where the name is concatenated. I suggest introducing a dedicated concat method which would handle quoted identifiers correctly.
Metadata
Metadata
Assignees
Labels
No labels