Giter Club home page Giter Club logo

Comments (4)

ogobrecht avatar ogobrecht commented on May 26, 2024

Hi Jacek,

as you mentioned before - with good default values for new parameters I see no reason to not to have this parameterized. could be the same like with our p_sequence_name parameter, which also do a replacement for the given string:

p_sequence_name

Suggested parameter name: p_api_name varchar2 default null

Best regards
Ottmar

from table-api-generator.

ogobrecht avatar ogobrecht commented on May 26, 2024

Hi Jacek,

Additional idea: the current string replacements are driven by our existing internal table and column name short names. I could think of to grab the number inside with an regex and you as a user are free to set any number you like as long as you use #TABLE_NAME_XX# or #PK_COLUMN_XX#.

As an example: you could use then #TABLE_NAME_17#.

The #COLUMN_PREFIX# is derived automatically - in the example below the it would be EMP. If not all columns have the same prefix then it would be null.

CREATE TABLE "HR"."EMPLOYEES" (
    "EMP_ID"               NUMBER(6,0),
    "EMP_FIRST_NAME"       VARCHAR2(20 BYTE),
    "EMP_LAST_NAME"        VARCHAR2(25 BYTE),
    "EMP_EMAIL"            VARCHAR2(25 BYTE),
    "EMP_PHONE_NUMBER"     VARCHAR2(20 BYTE),
    "EMP_HIRE_DATE"        DATE,
    "EMP_JOB_ID"           VARCHAR2(10 BYTE),
    "EMP_SALARY"           NUMBER(8,2),
    "EMP_COMMISSION_PCT"   NUMBER(2,2),
    "EMP_MANAGER_ID"       NUMBER(6,0),
    "EMP_DEPARTMENT_ID"    NUMBER(4,0)
);

Best regards
Ottmar

from table-api-generator.

ogobrecht avatar ogobrecht commented on May 26, 2024

I forgot to tell you why we do this at all:

We need this for the SQL Developer integration - there you can select multiple tables and generate all API code at ones - so we need a way to define a variable sequence name for each selected table.

Regards
Ottmar

from table-api-generator.

ogobrecht avatar ogobrecht commented on May 26, 2024

Hi Jacek,

the new version 0.5.0 is out (it took a long time). You can define in this version a custom API name - therefore I close now this issue.

Best regards
Ottmar

from table-api-generator.

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.