Search in sources :

Example 66 with FilterChainImpl

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

the class ResultSetProxyImpl method getNCharacterStream.

@Override
public Reader getNCharacterStream(int columnIndex) throws SQLException {
    FilterChainImpl chain = createChain();
    Reader value = chain.resultSet_getNCharacterStream(this, columnIndex);
    recycleFilterChain(chain);
    return value;
}
Also used : FilterChainImpl(com.alibaba.druid.filter.FilterChainImpl) Reader(java.io.Reader)

Example 67 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl 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 68 with FilterChainImpl

use of com.alibaba.druid.filter.FilterChainImpl 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)

Example 69 with FilterChainImpl

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

the class FilterChainTest_Clob_2 method test_getObject_1.

public void test_getObject_1() throws Exception {
    FilterChainImpl chain = new FilterChainImpl(dataSource);
    Clob clob = (Clob) chain.callableStatement_getObject(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)

Example 70 with FilterChainImpl

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

the class FilterChainTest_Clob_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 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

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