Search in sources :

Example 1 with ResultSetProxyImpl

use of com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl 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 2 with ResultSetProxyImpl

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

the class FilterChainTest_NClob method test_resultSet_getClob.

public void test_resultSet_getClob() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = chain.resultSet_getClob(new ResultSetProxyImpl(statement, mockResultSet, 1, null), 1);
    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) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 3 with ResultSetProxyImpl

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

the class FilterChainTest_NClob method test_resultSet_getObject_2.

public void test_resultSet_getObject_2() 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 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) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 4 with ResultSetProxyImpl

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

the class FilterChainTest_NClob method test_resultSet_getObject_1.

public void test_resultSet_getObject_1() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = (Clob) chain.resultSet_getObject(new ResultSetProxyImpl(statement, mockResultSet, 1, null), "1");
    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) ResultSetProxyImpl(com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)

Example 5 with ResultSetProxyImpl

use of com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl 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)

Aggregations

ResultSetProxyImpl (com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)19 FilterChainImpl (com.alibaba.druid.filter.FilterChainImpl)18 Clob (java.sql.Clob)12 MockClob (com.alibaba.druid.mock.MockClob)6 MockNClob (com.alibaba.druid.mock.MockNClob)6 MockResultSet (com.alibaba.druid.mock.MockResultSet)6 ClobProxy (com.alibaba.druid.proxy.jdbc.ClobProxy)6 NClobProxy (com.alibaba.druid.proxy.jdbc.NClobProxy)6 ResultSetProxy (com.alibaba.druid.proxy.jdbc.ResultSetProxy)6 ResultSet (java.sql.ResultSet)4 StatementProxy (com.alibaba.druid.proxy.jdbc.StatementProxy)3 SQLException (java.sql.SQLException)3 FilterChain (com.alibaba.druid.filter.FilterChain)2 DruidDataSource (com.alibaba.druid.pool.DruidDataSource)2 ConnectionProxy (com.alibaba.druid.proxy.jdbc.ConnectionProxy)2 DataSourceProxyConfig (com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig)2 DataSourceProxyImpl (com.alibaba.druid.proxy.jdbc.DataSourceProxyImpl)2 Properties (java.util.Properties)2 FilterAdapter (com.alibaba.druid.filter.FilterAdapter)1 FilterEventAdapter (com.alibaba.druid.filter.FilterEventAdapter)1