Git Product home page Git Product logo

Comments (2)

vadim-tropashko avatar vadim-tropashko commented on August 25, 2024 1

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.

neilfernandez avatar neilfernandez commented on August 25, 2024 1

Resolved by #56

from quicksql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.