use of com.alibaba.druid.pool.PreparedStatementHolder in project druid by alibaba.
the class PoolablePreparedStatementTest method setUp.
protected void setUp() throws Exception {
DruidDataSource dataSource = new DruidDataSource();
MockConnection mockConn = new MockConnection();
DruidConnectionHolder connHolder = new DruidConnectionHolder(dataSource, mockConn, 0);
DruidPooledConnection conn = new DruidPooledConnection(connHolder);
raw = new MockPreparedStatement(null, null);
stmt = new DruidPooledPreparedStatement(conn, new PreparedStatementHolder(new PreparedStatementKey("", null, null, 0, 0, 0), raw)) {
protected SQLException checkException(Throwable error) throws SQLException {
if (error instanceof SQLException) {
return (SQLException) error;
}
return new SQLException(error);
}
};
}
Aggregations