private static CommandInterface closeAndSetNull(CommandInterface command) { if (command != null) { command.close(); } return null; }
/** * Closes this statement. * All result sets that where created by this statement * become invalid after calling this method. */ @Override public void close() throws SQLException { try { super.close(); batchParameters = null; if (command != null) { command.close(); command = null; } } catch (Exception e) { throw logAndConvert(e); } }
private int executeUpdateInternal(String sql) throws SQLException { checkClosed(); try { closeOldResultSet(); sql = JdbcConnection.translateSQL(sql, escapeProcessing); CommandInterface command = conn.prepareCommand(sql, fetchSize); synchronized (session) { setExecutingStatement(command); try { updateCount = command.executeUpdate(); } finally { setExecutingStatement(null); } } command.close(); return updateCount; } finally { afterWriting(); } }
command.close(); return returnsResultSet; } finally {
setExecutingStatement(null); command.close(); resultSet = new JdbcResultSet(conn, this, result, id, closedByResultSet, scrollable, updatable);