com.ibatis.sqlmap.engine.execution
public class SqlExecutor extends Object
| Field Summary | |
|---|---|
| static int | NO_MAXIMUM_RESULTS
Constant to let us know to include all records |
| static int | NO_SKIPPED_RESULTS
Constant to let us know not to skip anything |
| Method Summary | |
|---|---|
| void | addBatch(StatementScope statementScope, Connection conn, String sql, Object[] parameters)
Adds a statement to a batch
|
| void | cleanup(SessionScope sessionScope)
Clean up any batches on the session
|
| int | executeBatch(SessionScope sessionScope)
Execute a batch of statements
|
| List | executeBatchDetailed(SessionScope sessionScope)
Execute a batch of statements
|
| void | executeQuery(StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skipResults, int maxResults, RowHandlerCallback callback)
Long form of the method to execute a query
|
| void | executeQueryProcedure(StatementScope statementScope, Connection conn, String sql, Object[] parameters, int skipResults, int maxResults, RowHandlerCallback callback)
Execute a stored procedure
|
| int | executeUpdate(StatementScope statementScope, Connection conn, String sql, Object[] parameters)
Execute an update
|
| int | executeUpdateProcedure(StatementScope statementScope, Connection conn, String sql, Object[] parameters)
Execute a stored procedure that updates data
|
Parameters: statementScope - the request scope conn - the database connection sql - the sql statement parameters - the parameters for the statement
Throws: SQLException - if the statement fails
Parameters: sessionScope - the session to clean up
Parameters: sessionScope - the session scope
Returns: - the number of rows impacted by the batch
Throws: SQLException - if a statement fails
Parameters: sessionScope - the session scope
Returns: - a List of BatchResult objects (may be null if no batch has been initiated). There will be one BatchResult object in the list for each sub-batch executed
Throws: SQLException if a database access error occurs, or the drive does not support batch statements BatchException if the driver throws BatchUpdateException
Parameters: statementScope - the request scope conn - the database connection sql - the SQL statement to execute parameters - the parameters for the statement skipResults - the number of results to skip maxResults - the maximum number of results to return callback - the row handler for the query
Throws: SQLException - if the query fails
Parameters: statementScope - the request scope conn - the database connection sql - the sql to call the procedure parameters - the parameters for the procedure skipResults - the number of results to skip maxResults - the maximum number of results to return callback - a row handler for processing the results
Throws: SQLException - if the procedure fails
Parameters: statementScope - the request scope conn - the database connection sql - the sql statement to execute parameters - the parameters for the sql statement
Returns: - the number of records changed
Throws: SQLException - if the update fails
Parameters: statementScope - the request scope conn - the database connection sql - the SQL to call the procedure parameters - the parameters for the procedure
Returns: - the rows impacted by the procedure
Throws: SQLException - if the procedure fails