@Override public boolean isClosed() { try { return super.isClosed(); } catch (SQLException e) { throw new RuntimeException( "Unexpected " + e + " from AvaticaPreparedStatement.isClosed"); } }
@Override public boolean isClosed() { try { return super.isClosed(); } catch (SQLException e) { throw new RuntimeException( "Unexpected " + e + " from AvaticaPreparedStatement.isClosed"); } }
@Override public boolean isClosed() { try { return super.isClosed(); } catch (SQLException e) { throw new RuntimeException( "Unexpected " + e + " from AvaticaPreparedStatement.isClosed" ); } }
@Override protected PreparedStatement newInstance() throws Exception { UnregisteredDriver driver = new TestDriver(); AvaticaConnection connection = new AvaticaConnection(driver, driver.createFactory(), "jdbc:avatica", new Properties()) { }; StatementHandle handle = mock(StatementHandle.class); Signature signature = new Signature(Collections.emptyList(), "", Collections.emptyList(), Collections.emptyMap(), null, Meta.StatementType.SELECT); AvaticaPreparedStatement preparedStatement = new AvaticaPreparedStatement(connection, handle, signature, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT) { }; preparedStatement.close(); assertTrue("Prepared statement is not closed", preparedStatement.isClosed()); return preparedStatement; } }
@Override protected PreparedStatement newInstance() throws Exception { UnregisteredDriver driver = new TestDriver(); AvaticaConnection connection = new AvaticaConnection(driver, driver.createFactory(), "jdbc:avatica", new Properties()) { }; StatementHandle handle = mock(StatementHandle.class); Signature signature = new Signature(Collections.emptyList(), "", Collections.emptyList(), Collections.emptyMap(), null, Meta.StatementType.SELECT); AvaticaPreparedStatement preparedStatement = new AvaticaPreparedStatement(connection, handle, signature, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT) { }; preparedStatement.close(); assertTrue("Prepared statement is not closed", preparedStatement.isClosed()); return preparedStatement; } }