- Since:
- 5
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBatchCompletion(int elementCount, int[] updateCounts, List<BatchCompletion.DetailedError> detailedErrors, int[] simplifiedErrors) -
Method Summary
Modifier and TypeMethodDescriptionDetailed errors per failed element, reporting the failed element number andSQLException.intbooleanint[]Simplified errors, reports failed element number, when error count exceeds the maximum detailed errors.int[]Update counts per element.
-
Constructor Details
-
BatchCompletion
public BatchCompletion(int elementCount, int[] updateCounts, List<BatchCompletion.DetailedError> detailedErrors, int[] simplifiedErrors)
-
-
Method Details
-
elementCount
public int elementCount()- Returns:
- number of elements (batch row values) processed by the server.
-
updateCounts
public int[] updateCounts()Update counts per element.Reports either the update count,
-1(BatchItems.BATCH_EXECUTE_FAILEDif the element resulted in an error (NOTE: JDBC uses-3(Statement.EXECUTE_FAILED!), or-2(BatchItems.BATCH_SUCCESS_NO_INFO) for success without update count (equivalent toStatement.SUCCESS_NO_INFO).The array is empty if
TAG_RECORD_COUNTSwas not requested.Note that contrary to JDBC, if
TAG_MULTIERRORis not requested, the last update count will be-1for the failed record (JDBC expects the update counts to end before the first failure).- Returns:
- update counts
-
detailedErrors
Detailed errors per failed element, reporting the failed element number andSQLException.Will have at most 1 error if
TAG_MULTIERRORis not requested.By default, at most 64 detailed errors will be reported (at most 256 can be requested with
TAG_DETAILED_ERRORS). The remaining errors will be reported insimplifiedErrors. The limits and defaults mentioned are as of Firebird 4 and not enforced by Jaybird.- Returns:
- detailed errors
-
simplifiedErrors
public int[] simplifiedErrors()Simplified errors, reports failed element number, when error count exceeds the maximum detailed errors.- Returns:
- rows with errors without detailed error information
-
hasErrors
public boolean hasErrors()- Returns:
trueif there are any errors,falseotherwise
-