Interface IBatchStatement

All Known Implementing Classes:
AbstractBatchStatement, BatchStatement, CompoundStatement, SimpleStatement

public interface IBatchStatement
A JDBC statement wrapper that batches SQL statements for execution.
Since:
Mar 15, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a SQL statement to the current batch.
    void
    Discards the accumulated batch of SQL statements without executing them.
    void
    Closes the underlying JDBC statement.
    int
    Executes the accumulated batch of SQL statements.
  • Method Details

    • addBatch

      void addBatch(String sql) throws SQLException
      Adds a SQL statement to the current batch.
      Parameters:
      sql - the SQL statement to add.
      Throws:
      SQLException - if a database access error occurs.
    • executeBatch

      int executeBatch() throws SQLException
      Executes the accumulated batch of SQL statements.
      Returns:
      the number of rows affected, summed across the batch.
      Throws:
      SQLException - if a database access error occurs.
    • clearBatch

      void clearBatch() throws SQLException
      Discards the accumulated batch of SQL statements without executing them.
      Throws:
      SQLException - if a database access error occurs.
    • close

      void close() throws SQLException
      Closes the underlying JDBC statement.
      Throws:
      SQLException - if a database access error occurs.