public final class BatchCompletion
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BatchCompletion.DetailedError |
Constructor and Description |
---|
BatchCompletion(int elementCount,
int[] updateCounts,
java.util.List<BatchCompletion.DetailedError> detailedErrors,
int[] simplifiedErrors) |
Modifier and Type | Method and Description |
---|---|
java.util.List<BatchCompletion.DetailedError> |
detailedErrors()
Detailed errors per failed element, reporting the failed element number and
SQLException . |
int |
elementCount() |
boolean |
hasErrors() |
int[] |
simplifiedErrors()
Simplified errors, reports failed element number, when error count exceeds the maximum detailed errors.
|
int[] |
updateCounts()
Update counts per element.
|
public BatchCompletion(int elementCount, int[] updateCounts, java.util.List<BatchCompletion.DetailedError> detailedErrors, int[] simplifiedErrors)
public int elementCount()
public int[] updateCounts()
Reports either the update count, -1
(BatchItems.BATCH_EXECUTE_FAILED
if 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 to
Statement.SUCCESS_NO_INFO
).
The array is empty if TAG_RECORD_COUNTS
was not requested.
Note that contrary to JDBC, if TAG_MULTIERROR
is not requested, the last update count will be -1
for the failed record (JDBC expects the update counts to end before the first failure).
public java.util.List<BatchCompletion.DetailedError> detailedErrors()
SQLException
.
Will have at most 1 error if TAG_MULTIERROR
is 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 in simplifiedErrors
. The
limits and defaults mentioned are as of Firebird 4 and not enforced by Jaybird.
public int[] simplifiedErrors()
public boolean hasErrors()
true
if there are any errors, false
otherwiseCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.