Search in sources :

Example 1 with DruidLobHandler

use of com.alibaba.druid.support.spring.DruidLobHandler in project druid by alibaba.

the class DruidLobHandlerTest method test_0.

public void test_0() throws Exception {
    DruidLobHandler handler = new DruidLobHandler();
    List<Object[]> rows = new ArrayList<Object[]>();
    rows.add(new Object[] { null, new MockBlob(), new MockClob() });
    MockResultSet rs = new MockResultSet(null, rows);
    rs.next();
    handler.getBlobAsBinaryStream(rs, 1);
    handler.getBlobAsBinaryStream(rs, "1");
    handler.getBlobAsBytes(rs, 1);
    handler.getBlobAsBytes(rs, "1");
    handler.getBlobAsBinaryStream(rs, 2);
    handler.getBlobAsBinaryStream(rs, "2");
    handler.getBlobAsBytes(rs, 2);
    handler.getBlobAsBytes(rs, "2");
    handler.getClobAsAsciiStream(rs, 1);
    handler.getClobAsAsciiStream(rs, "1");
    handler.getClobAsCharacterStream(rs, 1);
    handler.getClobAsCharacterStream(rs, "1");
    handler.getClobAsString(rs, 1);
    handler.getClobAsString(rs, "1");
    handler.getClobAsAsciiStream(rs, 3);
    handler.getClobAsAsciiStream(rs, "3");
    handler.getClobAsCharacterStream(rs, 3);
    handler.getClobAsCharacterStream(rs, "3");
    handler.getClobAsString(rs, 3);
    handler.getClobAsString(rs, "3");
    handler.getLobCreator();
}
Also used : MockBlob(com.alibaba.druid.mock.MockBlob) MockClob(com.alibaba.druid.mock.MockClob) ArrayList(java.util.ArrayList) MockResultSet(com.alibaba.druid.mock.MockResultSet) DruidLobHandler(com.alibaba.druid.support.spring.DruidLobHandler)

Aggregations

MockBlob (com.alibaba.druid.mock.MockBlob)1 MockClob (com.alibaba.druid.mock.MockClob)1 MockResultSet (com.alibaba.druid.mock.MockResultSet)1 DruidLobHandler (com.alibaba.druid.support.spring.DruidLobHandler)1 ArrayList (java.util.ArrayList)1