Package org.dbunit.database.statement
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 TypeMethodDescriptionvoidAdds a SQL statement to the current batch.voidDiscards the accumulated batch of SQL statements without executing them.voidclose()Closes the underlying JDBC statement.intExecutes the accumulated batch of SQL statements.
-
Method Details
-
addBatch
Adds a SQL statement to the current batch.- Parameters:
sql- the SQL statement to add.- Throws:
SQLException- if a database access error occurs.
-
executeBatch
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
Discards the accumulated batch of SQL statements without executing them.- Throws:
SQLException- if a database access error occurs.
-
close
Closes the underlying JDBC statement.- Throws:
SQLException- if a database access error occurs.
-