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