Code example for Statement

Methods: addBatch

0
  } 
 
  public void batch(Statement statement)
      throws SQLException { 
    String sql = boundSql.getSql();
    statement.addBatch(sql);
  } 
 
  public <E> List<E> query(Statement statement, ResultHandler resultHandler)
      throws SQLException { 
    String sql = boundSql.getSql();
    statement.execute(sql);
    return resultSetHandler.<E>handleResultSets(statement);
  } 
 
  protected Statement instantiateStatement(Connection connection) throws SQLException {
    if (mappedStatement.getResultSetType() != null) { 
      return connection.createStatement(mappedStatement.getResultSetType().getValue(), ResultSet.CONCUR_READ_ONLY);
    } else { 
      return connection.createStatement();
    }