Search in sources :

Example 1 with NClobProxy

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

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

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

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

the class FilterChainTest_NClob_2 method test_getClob_1.

public void test_getClob_1() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = chain.callableStatement_getClob(statement, "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)

Example 5 with NClobProxy

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

the class FilterChainTest_NClob_2 method test_getObject_3.

public void test_getObject_3() 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)

Aggregations

FilterChainImpl (com.alibaba.druid.filter.FilterChainImpl)12 MockNClob (com.alibaba.druid.mock.MockNClob)12 NClobProxy (com.alibaba.druid.proxy.jdbc.NClobProxy)12 Clob (java.sql.Clob)12 ResultSetProxyImpl (com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl)6