Comments (2)
I'm about to merge a fix where you'll have to use literals -- ordinary string literals or alternative ones. This would take care of the first two cases. The third case is handled with back quote literals, which are translated into SQL verbatim. Your example:
escape /insert 1
financial_year /check '23/24', `'24/25'`
surname vc60 /check 'O''Hara', q'{O'Tool}'
start_date /check `to_date('01-APR-2025','DD-MON-YYYY')`
Output:
-- create tables
create table escape (
id number default on null to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
constraint escape_id_pk primary key,
financial_year varchar2(4000 char) constraint escape_financial_year_ck
check (financial_year in ( '23/24','24/25')),
surname varchar2(60 char) constraint escape_surname_ck
check (surname in ( 'O''Hara',q'{O'Tool}')),
start_date date constraint escape_start_date_ck
check (start_date in ( to_date('01-APR-2025','DD-MON-YYYY')))
);
-- load data
insert into escape (
id,
financial_year,
surname,
start_date
) values (
1,
'24/25',
q'{O'Tool}',
to_date('01-APR-2025','DD-MON-YYYY')
);
from quicksql.
Resolved by #56
from quicksql.
Related Issues (20)
- /fk directive overrides INT data type to number HOT 1
- "Prefix primary keys with table name" with SYSGUID error HOT 6
- Use key words in the column name to default the data type HOT 1
- cannot create composite primary keys HOT 2
- email address parsing error for column defaults HOT 3
- Certain check constraint values can change column data type HOT 1
- Performance generating SQL with more than a few tables is not great
- Boolean Datatype 23c (Was: Order of 'default' with boolean produces invalid SQL) HOT 7
- Please Support /setnull Option Wherever /cascade is Supported to Enable Reverse Engineering Existing Schemas to Quick SQL HOT 5
- "Prefix primary keys with table name", table api error
- Confusing that #semantics:default is required to get default semantics HOT 1
- Update default `db` setting to be 19c or 23c HOT 1
- Missing customer_id in the diagram
- Unique constraint name unexpectedly leaves out table prefix if used
- /insert generates unexpected 'N/A' string for a blob column & data too long for vc20
- Add Oracle Text column directive
- Sample Data Model (Departments and Employees) produces bad SQL. Missing semi-colon, and bad BLOB insert. HOT 1
- FK reference to other tables HOT 4
- /rowkey table directive HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quicksql.