Skip to content

/default needs better support for Oracle functions and sequence.nextval #32

@dmcghan

Description

@dmcghan

This model:

queues
  queue_id num /pk
  created dt /default systimestamp

Yields this SQL:

create table queues (
    queue_id      number generated by default on null as identity
                  constraint queues_queue_id_pk primary key,
    created_dt    varchar2(4000 char) default on null 'systimestamp'
);

Note that systimestamp is treated as a string, when it should be a function. I see sysdate works fine in the version of QS that ships with APEX 23.2, so some code was added to handle that. However, that seems to be broken on the current version here: https://krisrice.io/quick-sql-standalone.html

An allow list approach will probably not scale anyway, especially considering things like my_owner.my_sequence.nextval.

I recommend adding a new directive (e.g., /defaultraw), which would not wrap the words(s) after it as a string.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions