DiagnosticsListener
methods.- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull String
The actual statement that is being executed.The duplicate statements that all correspond to a single normalised statement.@Nullable Throwable
The exception that occurred while diagnosing a statement.@NotNull String
message()
A message describing the diagnostics and the object in question.@NotNull String
The normalised statement that all duplicates correspond to.@Nullable QueryPart
part()
The object that was diagnosed if available, ornull
, if there was no specificQueryPart
to attach the diagnostic to.The repeated statements that all correspond to a single normalised statement.@Nullable ResultSet
TheResultSet
available in this context, ornull
, if there was no result set.int
The relevant column index (1 based) in theResultSet
if applicable, or0
if there was no result set.int
The number of columns that were consumed from theresultSet()
, or-1
if there was no result set.The number of columns that were consumed from theresultSet()
, or-1
if there was no result set.int
The number of rows that were consumed fromresultSet()
, or-1
if there was no result set.int
The number of columns that were actually available fromresultSet()
, or-1
if there was no result set.The number of columns that were actually available fromresultSet()
, or-1
if there was no result set.int
The number of rows that were actually available fromresultSet()
, or-1
if there was no result set.boolean
There had been a missingResultSet.wasNull()
call on a previously consumed primitive type, which is reported to beResultSetMetaData.isNullable(int)
.boolean
There had been an unnecessaryResultSet.wasNull()
call to check that a non-primitive type consumed previously was null, or the call was made more than once.
-
Method Details
-
part
The object that was diagnosed if available, ornull
, if there was no specificQueryPart
to attach the diagnostic to. -
message
A message describing the diagnostics and the object in question. -
resultSet
TheResultSet
available in this context, ornull
, if there was no result set. -
resultSetConsumedRows
int resultSetConsumedRows()The number of rows that were consumed fromresultSet()
, or-1
if there was no result set. -
resultSetFetchedRows
int resultSetFetchedRows()The number of rows that were actually available fromresultSet()
, or-1
if there was no result set.Calling this method will try to scroll to the end of the
resultSet()
, in order to count the number of rows, which incurs overhead!If the result set is still being consumed (i.e. prior to the
ResultSet.close()
call), and scrolling back to the current row after scrolling to the end ofresultSet()
is not possible (e.g. because the driver supports onlyResultSet.TYPE_FORWARD_ONLY
), then this will return the same value asresultSetConsumedRows()
. -
resultSetConsumedColumnCount
int resultSetConsumedColumnCount()The number of columns that were consumed from theresultSet()
, or-1
if there was no result set.If the result set is still being consumed (i.e. prior to the
ResultSet.close()
call), then this will return the number of columns that were retrieved from theresultSet()
set thus far. -
resultSetFetchedColumnCount
int resultSetFetchedColumnCount()The number of columns that were actually available fromresultSet()
, or-1
if there was no result set. -
resultSetConsumedColumnNames
The number of columns that were consumed from theresultSet()
, or-1
if there was no result set.If the result set is still being consumed (i.e. prior to the
ResultSet.close()
call), then this will return the number of columns that were retrieved from theresultSet()
set thus far. -
resultSetFetchedColumnNames
The number of columns that were actually available fromresultSet()
, or-1
if there was no result set. -
resultSetUnnecessaryWasNullCall
boolean resultSetUnnecessaryWasNullCall()There had been an unnecessaryResultSet.wasNull()
call to check that a non-primitive type consumed previously was null, or the call was made more than once.resultSetColumnIndex()
will return the relevant column index for which theResultSet.wasNull()
call was missing.- See Also:
-
resultSetMissingWasNullCall
boolean resultSetMissingWasNullCall()There had been a missingResultSet.wasNull()
call on a previously consumed primitive type, which is reported to beResultSetMetaData.isNullable(int)
.resultSetColumnIndex()
will return the relevant column index for which theResultSet.wasNull()
call was missing.- See Also:
-
resultSetColumnIndex
int resultSetColumnIndex()The relevant column index (1 based) in theResultSet
if applicable, or0
if there was no result set. -
actualStatement
The actual statement that is being executed. -
normalisedStatement
The normalised statement that all duplicates correspond to. -
duplicateStatements
The duplicate statements that all correspond to a single normalised statement. -
repeatedStatements
The repeated statements that all correspond to a single normalised statement. -
exception
The exception that occurred while diagnosing a statement.
-