Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.HarmonySerialClob


       
        out[0] = new HarmonySerialBlob( new byte[] { (byte) 1, (byte) 2, (byte) 3 } );
    }

    public static void pmap(Clob in, Clob[] inout, Clob[] out) throws SQLException {
        inout[0] = new HarmonySerialClob( in.getSubString( 1L, (int) in.length() ) + inout[0].getSubString( 1L, (int) inout[0].length() ) );
        out[0] = new HarmonySerialClob( "abc" );
    }
View Full Code Here


    {
        result[ 0 ] = getClobValue( c );
    }
    public static void clobOut( Clob[] c ) throws SQLException
    {
        c[ 0 ] = new HarmonySerialClob( "abc" );
    }
View Full Code Here

        String value = getClobValue( c[ 0 ] );
       
        char[] inValue = value.toCharArray();
        char[] outValue = reverse( inValue );

        c[ 0 ] = new HarmonySerialClob( new String( outValue ) );
    }
View Full Code Here

    public  static  Clob  reverse( Clob inputClob )
        throws SQLException
    {
        if ( inputClob == null ) { return null; }

        return new HarmonySerialClob( reverse( inputClob.getSubString( 1L, (int) inputClob.length() ) ) );
    }
View Full Code Here

        throws SQLException
    {
        if ( left ==  null ) { return null; }
        if ( right == null ) { return null; }

        return new HarmonySerialClob
            ( left.getSubString( 1L, (int) left.length() ) + right.getSubString( 1L, (int) right.length() ) );
    }
View Full Code Here

        for ( int i = 0; i < repeatCount; i++ )
        {
            for ( String val : inputs ) { buffer.append( val ); }
        }

        return new HarmonySerialClob( buffer.toString() );
    }
View Full Code Here

        cs.execute();
        assertEquals( "def", cs.getString( 1 ) );
        cs.close();

        cs = chattyPrepareCall( conn, "call clobIn( ?, ? )" );
        cs.setClob( 1, new HarmonySerialClob( "ghi" ) );
        cs.registerOutParameter( 2, Types.VARCHAR );
        cs.execute();
        assertEquals( "ghi", cs.getString( 2 ) );
        cs.close();

        //
        // Clob output parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure clobOut\n" +
             "( out c clob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".clobOut'\n"
             );
        ps.execute();
        ps.close();
       
        cs = chattyPrepareCall( conn, "call clobOut( ? )" );
        cs.registerOutParameter( 1, Types.CLOB );
        cs.execute();
        outVal = cs.getClob( 1 );
        assertEquals( "abc", outVal.getSubString( 1L, (int) outVal.length() ) );
        cs.close();

        //
        // Clob inout parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure clobInOut\n" +
             "( inout c clob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".clobInOut'\n"
             );
        ps.execute();
        ps.close();
       
        cs = chattyPrepareCall( conn, "call clobInOut( ? )" );
        cs.setClob( 1, new HarmonySerialClob( "ghi" ) );
        cs.registerOutParameter( 1, Types.CLOB );
        cs.execute();
        outVal = cs.getClob( 1 );
        assertEquals( "ihg", outVal.getSubString( 1L, (int) outVal.length() ) );
View Full Code Here

                value[ idx++ ] = template[ j ];
            }
                         
        }
       
        return new HarmonySerialClob( new String( value ) );
    }
View Full Code Here

       
        out[0] = new HarmonySerialBlob( new byte[] { (byte) 1, (byte) 2, (byte) 3 } );
    }

    public static void pmap(Clob in, Clob[] inout, Clob[] out) throws SQLException {
        inout[0] = new HarmonySerialClob( in.getSubString( 1L, (int) in.length() ) + inout[0].getSubString( 1L, (int) inout[0].length() ) );
        out[0] = new HarmonySerialClob( "abc" );
    }
View Full Code Here

    {
        result[ 0 ] = getClobValue( c );
    }
    public static void clobOut( Clob[] c ) throws SQLException
    {
        c[ 0 ] = new HarmonySerialClob( "abc" );
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.HarmonySerialClob

Copyright © 2018 www.massapicom. 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.