Giter VIP home page Giter VIP logo

db2-scheme2ddl's People

Contributors

qwazer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tjondro radtek

db2-scheme2ddl's Issues

findTablePkeys - wrong query

public List<Db2LookInfo> findTablePkeys(UserObject userObject) {
    List<Db2LookInfo> list = getJdbcTemplate().query(
            "SELECT * " +
                    " FROM SYSTOOLS.DB2LOOK_INFO t " +
                    " WHERE OBJ_TYPE = 'PKEY' AND OP_TOKEN = ?  AND t.OBJ_SCHEMA = ? AND OBJ_NAME = ?" +
                    "      AND exists( " +
                    "    SELECT 1 " +
                    "    FROM SYSCAT.REFERENCES R " +
                    "    WHERE R.TABSCHEMA = t.OBJ_SCHEMA " +
                    "          AND R.TABNAME = t.OBJ_NAME)",
            new Object[]{userObject.getOpToken(), schemaName, userObject.getName()},

            new Db2LookInfoRowMapper());


    return list;
}

support grants for procedures

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 28 Jan 2015 at 1:49

default config for com.ibm.db2.jcc.DB2DataSource

<bean id="dataSource" class="com.ibm.db2.jcc.DB2DataSource">
           <property name="serverName" value=""/>
     <property name="databaseName" value=""/>   
        <property name="portNumber" value=""/>
            <property name="user" value=""/>
            <property name="password" value=""/>
    <property name="driverType" value=""/>
</bean>

add option to ignore auto generated seq values

CREATE TABLE "MY      "."STUDENT"  (
          "SID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (  
            START WITH +1  
            INCREMENT BY +1  
            MINVALUE +1  
            MAXVALUE +2147483647  
            NO CYCLE  
            CACHE 20  
            NO ORDER ) , 
          "SNAME" VARCHAR(30) )   
         IN "IBMDB2SAMPLEREL"   ;
ALTER TABLE "MY      "."STUDENT" ALTER COLUMN "SID" RESTART WITH 100 ;

replace quotes

Index: src/main/java/com/googlecode/scheme2ddl/db2/UserObjectWriter.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/com/googlecode/scheme2ddl/db2/UserObjectWriter.java   (date 1427695566000)
+++ src/main/java/com/googlecode/scheme2ddl/db2/UserObjectWriter.java   (revision )
@@ -29,6 +29,7 @@

     public void writeUserObject(UserObject userObject) throws Exception {
         String absoluteFileName = outputPath + "/" +  userObject.getFileName();
+        absoluteFileName = absoluteFileName.replaceAll("\"", "_"); //todo
         absoluteFileName = FilenameUtils.separatorsToSystem(absoluteFileName);
         File file = new File(absoluteFileName);
         FileUtils.writeStringToFile(file, userObject.getDdl());

support for partitions

http://www.ibm.com/developerworks/data/library/techarticle/dm-0605ahuja2/
http://www.dbatodba.com/db2/db2-udb-v9/how-to-know-the-number-of-partitons-and-r
anges-from-partitioned-tables/


Original issue reported on code.google.com by [email protected] on 28 Jan 2015 at 1:51

support uniq indexes

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 28 Jan 2015 at 1:50

Authorization statement on sequence

---------------------------------------
-- Authorization statement on sequence 
---------------------------------------


GRANT USAGE ON SEQUENCE "DB2INST1"."SAMPSEQUENCE" TO USER "DB2INST1" WITH GRANT OPTION;

GRANT ALTER ON SEQUENCE "DB2INST1"."SAMPSEQUENCE" TO USER "DB2INST1" WITH GRANT OPTION;

GRANT USAGE ON SEQUENCE "SYSTOOLS"."DB2LOOK_TOKEN" TO USER "DB2INST1" WITH GRANT OPTION;

GRANT ALTER ON SEQUENCE "SYSTOOLS"."DB2LOOK_TOKEN" TO USER "DB2INST1" WITH GRANT OPTION;

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.