Search in sources :

Example 81 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl in project druid by alibaba.

the class FilterChainTest_NClob_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 NClobProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) NClobProxy(com.alibaba.druid.proxy.jdbc.NClobProxy) MockNClob(com.alibaba.druid.mock.MockNClob) Clob(java.sql.Clob)

Example 82 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl in project druid by alibaba.

the class FilterChainTest_ResultSet method test_resultSet_getObject.

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

Example 83 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl in project druid by alibaba.

the class FilterChainTest_ResultSet method test_resultSet_getObject_1.

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

Example 84 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl in project druid by alibaba.

the class FilterChainTest_ResultSet_2 method test_getObject_1.

public void test_getObject_1() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    ResultSet clob = (ResultSet) chain.callableStatement_getObject(statement, "1");
    Assert.assertTrue(clob instanceof ResultSetProxy);
    Assert.assertEquals(1, invokeCount);
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) MockResultSet(com.alibaba.druid.mock.MockResultSet) ResultSet(java.sql.ResultSet) ResultSetProxy(com.alibaba.druid.proxy.jdbc.ResultSetProxy)

Example 85 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl in project druid by alibaba.

the class FilterChainTest_ResultSet_2 method test_getObject_3.

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

Aggregations

FilterChainImpl (com.alibaba.druid.filter.FilterChainImpl)326 Clob (java.sql.Clob)27 ResultSetProxyImpl (com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)18 MockNClob (com.alibaba.druid.mock.MockNClob)14 MockClob (com.alibaba.druid.mock.MockClob)12 ClobProxy (com.alibaba.druid.proxy.jdbc.ClobProxy)12 NClobProxy (com.alibaba.druid.proxy.jdbc.NClobProxy)12 ResultSet (java.sql.ResultSet)11 MockResultSet (com.alibaba.druid.mock.MockResultSet)9 ResultSetProxy (com.alibaba.druid.proxy.jdbc.ResultSetProxy)9 NClob (java.sql.NClob)8 InputStream (java.io.InputStream)6 PreparedStatement (java.sql.PreparedStatement)6 Reader (java.io.Reader)4 CallableStatement (java.sql.CallableStatement)4 Connection (java.sql.Connection)4 Date (java.sql.Date)4 Timestamp (java.sql.Timestamp)4 Properties (java.util.Properties)4 FilterChain (com.alibaba.druid.filter.FilterChain)3