Search in sources :

Example 1 with ClobProxy

use of com.alibaba.druid.proxy.jdbc.ClobProxy in project druid by alibaba.

the class FilterChainTest_Clob method test_resultSet_getObject.

public void test_resultSet_getObject() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = (Clob) chain.resultSet_getObject(new ResultSetProxyImpl(statement, mockResultSet, 1, null), 1);
    Assert.assertTrue(clob instanceof ClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) ClobProxy(com.alibaba.druid.proxy.jdbc.ClobProxy) MockClob(com.alibaba.druid.mock.MockClob) Clob(java.sql.Clob) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 2 with ClobProxy

use of com.alibaba.druid.proxy.jdbc.ClobProxy in project druid by alibaba.

the class FilterChainTest_Clob method test_resultSet_getClob_1.

public void test_resultSet_getClob_1() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = chain.resultSet_getClob(new ResultSetProxyImpl(statement, mockResultSet, 1, null), "1");
    Assert.assertTrue(clob instanceof ClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) ClobProxy(com.alibaba.druid.proxy.jdbc.ClobProxy) MockClob(com.alibaba.druid.mock.MockClob) Clob(java.sql.Clob) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 3 with ClobProxy

use of com.alibaba.druid.proxy.jdbc.ClobProxy in project druid by alibaba.

the class FilterChainTest_Clob method test_resultSet_getObject_3.

public void test_resultSet_getObject_3() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = (Clob) chain.resultSet_getObject(new ResultSetProxyImpl(statement, mockResultSet, 1, null), "1", Collections.<String, Class<?>>emptyMap());
    Assert.assertTrue(clob instanceof ClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) ClobProxy(com.alibaba.druid.proxy.jdbc.ClobProxy) MockClob(com.alibaba.druid.mock.MockClob) Clob(java.sql.Clob) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 4 with ClobProxy

use of com.alibaba.druid.proxy.jdbc.ClobProxy in project druid by alibaba.

the class FilterChainTest_Clob_2 method test_getObject_2.

public void test_getObject_2() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = (Clob) chain.callableStatement_getObject(statement, 1, Collections.<String, Class<?>>emptyMap());
    Assert.assertTrue(clob instanceof ClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) ClobProxy(com.alibaba.druid.proxy.jdbc.ClobProxy) MockClob(com.alibaba.druid.mock.MockClob) Clob(java.sql.Clob)

Example 5 with ClobProxy

use of com.alibaba.druid.proxy.jdbc.ClobProxy in project druid by alibaba.

the class FilterChainTest_Clob_2 method test_getClob.

public void test_getClob() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = chain.callableStatement_getClob(statement, 1);
    Assert.assertTrue(clob instanceof ClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) ClobProxy(com.alibaba.druid.proxy.jdbc.ClobProxy) MockClob(com.alibaba.druid.mock.MockClob) Clob(java.sql.Clob)

Aggregations

ClobProxy (com.alibaba.druid.proxy.jdbc.ClobProxy)14 MockClob (com.alibaba.druid.mock.MockClob)13 Clob (java.sql.Clob)13 FilterChainImpl (com.alibaba.druid.filter.FilterChainImpl)12 ResultSetProxyImpl (com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)6 Connection (java.sql.Connection)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 JdbcSqlStat (com.alibaba.druid.stat.JdbcSqlStat)1 StringReader (java.io.StringReader)1 Statement (java.sql.Statement)1