Package java.sql

Examples of java.sql.Clob.free()


    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
    connection.close();
  }

  public void testConnectedLobCreatorWithUnSupportedCreations() throws SQLException {
    final Connection connection = createConnectionProxy(
View Full Code Here


    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
    connection.close();
  }

  public void testLegacyLobCreator() throws SQLException {
    LobCreator lobCreator = JdbcSupportLoader.loadJdbcSupport( null ).getLobCreator();
View Full Code Here

    nclob = lobCreator.wrap( nclob );
    assertTrue( nclob instanceof WrappedClob );

    blob.free();
    clob.free();
    nclob.free();
  }

  private interface JdbcLobBuilder {
    public Blob createBlob();
    public Clob createClob();
View Full Code Here

            message.payload = rs.getString("payload_utf8");
          } else {
            Clob clob = rs.getClob("payload_utf8");
            int length = Math.min(payloadLength, (int) clob.length());
            message.payload = clob.getSubString(1, length);
            clob.free();
          }
         
          if (message.payload == null) {
            message.payload = "";
          }
View Full Code Here

                clob.getCharacterStream(),
                length,
                new LoopingAlphabetReader(length));

            if (freelob)
                clob.free();
            if (commitAfterLobVerify)
                commit();
        }
        rs.close();
        commit();
View Full Code Here

    ResultSet rs = stmt.executeQuery("SELECT data FROM blobtest");
    assertTrue(rs.next());

    Clob clob = rs.getClob(1);
    clob.free();
    try {
      clob.length();
      fail("Should have thrown an Exception because it was freed.");
    }
    catch (SQLException sqle) {
View Full Code Here

                clob.getCharacterStream(),
                length,
                new LoopingAlphabetReader(length));

            if (freelob)
                clob.free();
            if (commitAfterLobVerify)
                commit();
        }
        rs.close();
        commit();
View Full Code Here

      final Throwable throwable) throws SQLException {
    StringReader content = new StringReader(CONTENT);
    Clob clob = createMock(Clob.class);
    expect(clob.length()).andReturn(CONTENT_LENGTH).anyTimes();
    expect(clob.getCharacterStream()).andReturn(content).anyTimes();
    clob.free();
    expectLastCall().andThrow(throwable).atLeastOnce();
    replay(clob);

    ResultSet rs = createMock(ResultSet.class);
    expect(rs.getClob(anyInt())).andReturn(clob).anyTimes();
View Full Code Here

                readClob.getCharacterStream().close();
                readClob.getAsciiStream().close();
                readClob.getCharacterStream(1, 1).close();
                readClob.getSubString(1, 2);
                readClob.truncate(2);
                readClob.free();
            }
            JdbcUtils.close(rs);

            rs = stmt.executeQuery("SELECT ID, DATA FROM T_CLOB");
            while (rs.next()) {
View Full Code Here

            while (rs.next()) {
                Clob searchstr = conn.createClob();
                searchstr.setString(1, "AB");
                Clob x = rs.getClob("DATA");
                x.position(searchstr, 1);
                x.free();
            }
            JdbcUtils.close(rs);

            rs = stmt.executeQuery("SELECT ID, DATA FROM T_CLOB");
            while (rs.next()) {
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.