Package org.apache.derbyTesting.functionTests.tests.upgradeTests

Examples of org.apache.derbyTesting.functionTests.tests.upgradeTests.Version.compareTo()


        //
        // We only run this test if the database version is at least 10.6.
        // Otherwise we can't create a UDT.
        //
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 6, 0, 0 ) ) < 0 ) { return; }
       
        DatabaseMetaData dmd = getDMD();

        createObjectsForUDTTests();
View Full Code Here


        //
        // The BOOLEAN datatype is only allowed in databases
        // at level 10.7 or higher.
        //
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 7, 0, 0 ) ) < 0 )
        {
            types.remove("BOOLEAN");
        }
       
        int typeCount = types.size();
View Full Code Here

        // network client.
        // DMD returns BOOLEAN
        // RSMD returns SMALLINT
        int dmdColumnType = rs.getInt("DATA_TYPE");
        if (dmdColumnType == Types.JAVA_OBJECT && usingDerbyNetClient()
                 &&  ( dataVersion.compareTo( new Version( 10, 6, 0, 0 ) ) < 0 ) )
        {
            // DMD returns JAVA_OBJECT
            // RSMD returns LONGVARBINARY!                   
            assertEquals("DATA_TYPE",
                    Types.LONGVARBINARY, rsmdt.getColumnType(col));                  
View Full Code Here

            supportedTypes.add(new Integer(allTypes[i]));
        }

        Version dataVersion = getDataVersion(getConnection());
        boolean booleanSupported =
                dataVersion.compareTo(new Version(10, 7, 0, 0)) >= 0;
       
        // DERBY-4946: Boolean isn't supported if DB is soft-upgraded from
        // pre-10.7 version
        if (!booleanSupported) {
            supportedTypes.remove(new Integer(Types.BOOLEAN));
View Full Code Here

    //   metadata with sys.sys* query results (leave shape check in place)
    public void testGetProceduresGetProcColumns() throws Exception {

        boolean supportsBoolean = true;
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 7, 0, 0 ) ) < 0 ) { supportsBoolean = false; }

        Statement s = createStatement();
        getConnection().setAutoCommit(false);
       
        s.execute("create procedure GETPCTEST1 (" +
View Full Code Here

    {
        // this method is supported in database meta data only from 10.2 onward

        boolean supportsBoolean = true;
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 7, 0, 0 ) ) < 0 ) { supportsBoolean = false; }
       
        if ( dataVersion.compareTo( new Version( 10, 2, 0, 0 ) ) < 0 ) { return; }

        DatabaseMetaData dmd = getDMD();
        Statement s = createStatement();
View Full Code Here

        boolean supportsBoolean = true;
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 7, 0, 0 ) ) < 0 ) { supportsBoolean = false; }
       
        if ( dataVersion.compareTo( new Version( 10, 2, 0, 0 ) ) < 0 ) { return; }

        DatabaseMetaData dmd = getDMD();
        Statement s = createStatement();
        getConnection().setAutoCommit(false);
       
View Full Code Here

     * Test methods added by JDBC 4.1
     */
    public void test_jdbc4_1() throws Exception
    {
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 8, 0, 0 ) ) < 0 ) { return; }

        Statement s = createStatement();
        DatabaseMetaData dmd = getDMD();
        println( "Testing JDBC 4.1 methods on a " + dmd.getClass().getName() );
        Wrapper41DBMD wrapper = new Wrapper41DBMD( dmd );
View Full Code Here

        //
        // We only run this test if the database version is at least 10.6.
        // Otherwise we can't create a UDT.
        //
        Version dataVersion = getDataVersion( getConnection() );
        if ( dataVersion.compareTo( new Version( 10, 6, 0, 0 ) ) < 0 ) { return; }
       
        DatabaseMetaData dmd = getDMD();

        createObjectsForUDTTests();
View Full Code Here

            assertEquals("DATA_TYPE",
                    Types.SMALLINT, rsmdt.getColumnType(col));
        }
        else if (dmdColumnType == Types.JAVA_OBJECT && usingDerbyNetClient()
                 &&  ( dataVersion.compareTo( new Version( 10, 6, 0, 0 ) ) < 0 ) )
        {
            // DMD returns JAVA_OBJECT
            // RSMD returns LONGVARBINARY!                   
            assertEquals("DATA_TYPE",
                    Types.LONGVARBINARY, rsmdt.getColumnType(col));                  
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.