Top Fields Constructors Methods
org.jooq.impl

pack-priv final Class DefaultDiagnosticsContext

extends AbstractScope
implements DiagnosticsContext
Class Inheritance
All Implemented Interfaces
org.jooq.DiagnosticsContext, org.jooq.Scope
Static Imports
java.util.Collections.emptyList, .Collections.emptySet, .Collections.singleton, .Collections.singletonList

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final Set<String>
pack-priv final Throwable
private static final JooqLogger
pack-priv final String
pack-priv final String
pack-priv final QueryPart
pack-priv final List<String>
pack-priv ResultSet
pack-priv boolean
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv int
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv DiagnosticsResultSet
resultSetWrapper

Deprecated as a consequence of DiagnosticsResultSet being deprecated.
pack-priv final QueryPart
Inherited from org.jooq.impl.AbstractScope:
configurationcreationTimedata

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement)

pack-priv
DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement, Throwable exception)

pack-priv
DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement, String normalisedStatement, Set<String> duplicateStatements, List<String> repeatedStatements, QueryPart part, QueryPart transformedPart, Throwable exception)

Method Summary

Modifier and TypeMethod and Description
public final String
actualStatement()

Implements org.jooq.DiagnosticsContext.actualStatement.

The actual statement that is being executed.
public final Set<String>
duplicateStatements()

Implements org.jooq.DiagnosticsContext.duplicateStatements.

The duplicate statements that all correspond to a single normalised statement.
public final Throwable
exception()

Implements org.jooq.DiagnosticsContext.exception.

The exception that occurred while diagnosing a statement.
public final String
message()

Implements org.jooq.DiagnosticsContext.message.

A message describing the diagnostics and the object in question.
public final String
normalisedStatement()

Implements org.jooq.DiagnosticsContext.normalisedStatement.

The normalised statement that all duplicates correspond to.
public final QueryPart
part()

Implements org.jooq.DiagnosticsContext.part.

The object that was diagnosed if available, or null, if there was no specific QueryPart to attach the diagnostic to.
public final List<String>
repeatedStatements()

Implements org.jooq.DiagnosticsContext.repeatedStatements.

The repeated statements that all correspond to a single normalised statement.
public final ResultSet
resultSet()

Implements org.jooq.DiagnosticsContext.resultSet.

The ResultSet available in this context, or null, if there was no result set.
public final int
resultSetColumnIndex()

Implements org.jooq.DiagnosticsContext.resultSetColumnIndex.

The relevant column index (1 based) in the ResultSet if applicable, or 0 if there was no result set.
private final List<String>
resultSetColumnNames(boolean fetched)

public final int
resultSetConsumedColumnCount()

Implements org.jooq.DiagnosticsContext.resultSetConsumedColumnCount.

The number of columns that were consumed from the resultSet(), or -1 if there was no result set.
public final List<String>
resultSetConsumedColumnNames()

Implements org.jooq.DiagnosticsContext.resultSetConsumedColumnNames.

The number of columns that were consumed from the resultSet(), or -1 if there was no result set.
public final int
resultSetConsumedRows()

Implements org.jooq.DiagnosticsContext.resultSetConsumedRows.

The number of rows that were consumed from resultSet(), or -1 if there was no result set.
public final int
resultSetFetchedColumnCount()

Implements org.jooq.DiagnosticsContext.resultSetFetchedColumnCount.

The number of columns that were actually available from resultSet(), or -1 if there was no result set.
public final List<String>
resultSetFetchedColumnNames()

Implements org.jooq.DiagnosticsContext.resultSetFetchedColumnNames.

The number of columns that were actually available from resultSet(), or -1 if there was no result set.
public final int
resultSetFetchedRows()

Implements org.jooq.DiagnosticsContext.resultSetFetchedRows.

The number of rows that were actually available from resultSet(), or -1 if there was no result set.
public final boolean
resultSetMissingWasNullCall()

Implements org.jooq.DiagnosticsContext.resultSetMissingWasNullCall.

There had been a missing ResultSet#wasNull() call on a previously consumed primitive type, which is reported to be ResultSetMetaData#isNullable(int).
public final boolean
resultSetUnnecessaryWasNullCall()

Implements org.jooq.DiagnosticsContext.resultSetUnnecessaryWasNullCall.

There had been an unnecessary ResultSet#wasNull() call to check that a non-primitive type consumed previously was null, or the call was made more than once.
public final QueryPart
transformedPart()

Implements org.jooq.DiagnosticsContext.transformedPart.

The transformed object from part() if available, or null, if there was no specific transformation to attach the diagnostic to.
Inherited from org.jooq.impl.AbstractScope:
configurationcreationTimedatadatadatadialectdslfamilysettings

Field Detail

actualStatementback to summary
pack-priv final String actualStatement
duplicateStatementsback to summary
pack-priv final Set<String> duplicateStatements
exceptionback to summary
pack-priv final Throwable exception
logback to summary
private static final JooqLogger log
messageback to summary
pack-priv final String message
normalisedStatementback to summary
pack-priv final String normalisedStatement
partback to summary
pack-priv final QueryPart part
repeatedStatementsback to summary
pack-priv final List<String> repeatedStatements
resultSetback to summary
pack-priv ResultSet resultSet
resultSetClosingback to summary
pack-priv boolean resultSetClosing
resultSetColumnIndexback to summary
pack-priv int resultSetColumnIndex
resultSetConsumedColumnCountback to summary
pack-priv int resultSetConsumedColumnCount
resultSetConsumedRowsback to summary
pack-priv int resultSetConsumedRows
resultSetFetchedColumnCountback to summary
pack-priv int resultSetFetchedColumnCount
resultSetFetchedRowsback to summary
pack-priv int resultSetFetchedRows
resultSetFetchedRowsComputedback to summary
pack-priv boolean resultSetFetchedRowsComputed
resultSetMissingWasNullCallback to summary
pack-priv boolean resultSetMissingWasNullCall
resultSetUnnecessaryWasNullCallback to summary
pack-priv boolean resultSetUnnecessaryWasNullCall
resultSetWrapperback to summary
pack-priv DiagnosticsResultSet resultSetWrapper

Deprecated

as a consequence of DiagnosticsResultSet being deprecated. See corresponding docs for further information.

transformedPartback to summary
pack-priv final QueryPart transformedPart

Constructor Detail

DefaultDiagnosticsContextback to summary
pack-priv DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement)
DefaultDiagnosticsContextback to summary
pack-priv DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement, Throwable exception)
DefaultDiagnosticsContextback to summary
pack-priv DefaultDiagnosticsContext(Configuration configuration, String message, String actualStatement, String normalisedStatement, Set<String> duplicateStatements, List<String> repeatedStatements, QueryPart part, QueryPart transformedPart, Throwable exception)

Method Detail

actualStatementback to summary
public final String actualStatement()

Implements org.jooq.DiagnosticsContext.actualStatement.

Doc from org.jooq.DiagnosticsContext.actualStatement.

The actual statement that is being executed.

Annotations
@Override
duplicateStatementsback to summary
public final Set<String> duplicateStatements()

Implements org.jooq.DiagnosticsContext.duplicateStatements.

Doc from org.jooq.DiagnosticsContext.duplicateStatements.

The duplicate statements that all correspond to a single normalised statement.

This set is used by at least:

Annotations
@Override
exceptionback to summary
public final Throwable exception()

Implements org.jooq.DiagnosticsContext.exception.

Doc from org.jooq.DiagnosticsContext.exception.

The exception that occurred while diagnosing a statement.

Annotations
@Override
messageback to summary
public final String message()

Implements org.jooq.DiagnosticsContext.message.

Doc from org.jooq.DiagnosticsContext.message.

A message describing the diagnostics and the object in question.

Annotations
@Override
normalisedStatementback to summary
public final String normalisedStatement()

Implements org.jooq.DiagnosticsContext.normalisedStatement.

Doc from org.jooq.DiagnosticsContext.normalisedStatement.

The normalised statement that all duplicates correspond to.

Annotations
@Override
partback to summary
public final QueryPart part()

Implements org.jooq.DiagnosticsContext.part.

Doc from org.jooq.DiagnosticsContext.part.

The object that was diagnosed if available, or null, if there was no specific QueryPart to attach the diagnostic to.

Annotations
@Override
repeatedStatementsback to summary
public final List<String> repeatedStatements()

Implements org.jooq.DiagnosticsContext.repeatedStatements.

Doc from org.jooq.DiagnosticsContext.repeatedStatements.

The repeated statements that all correspond to a single normalised statement.

This set is used by at least:

Annotations
@Override
resultSetback to summary
public final ResultSet resultSet()

Implements org.jooq.DiagnosticsContext.resultSet.

Doc from org.jooq.DiagnosticsContext.resultSet.

The ResultSet available in this context, or null, if there was no result set.

Annotations
@Override
resultSetColumnIndexback to summary
public final int resultSetColumnIndex()

Implements org.jooq.DiagnosticsContext.resultSetColumnIndex.

Doc from org.jooq.DiagnosticsContext.resultSetColumnIndex.

The relevant column index (1 based) in the ResultSet if applicable, or 0 if there was no result set.

Annotations
@Override
resultSetColumnNamesback to summary
private final List<String> resultSetColumnNames(boolean fetched)
resultSetConsumedColumnCountback to summary
public final int resultSetConsumedColumnCount()

Implements org.jooq.DiagnosticsContext.resultSetConsumedColumnCount.

Doc from org.jooq.DiagnosticsContext.resultSetConsumedColumnCount.

The number of columns that were consumed from the resultSet(), 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 the resultSet() set thus far.

Annotations
@Override
resultSetConsumedColumnNamesback to summary
public final List<String> resultSetConsumedColumnNames()

Implements org.jooq.DiagnosticsContext.resultSetConsumedColumnNames.

Doc from org.jooq.DiagnosticsContext.resultSetConsumedColumnNames.

The number of columns that were consumed from the resultSet(), 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 the resultSet() set thus far.

Annotations
@Override
resultSetConsumedRowsback to summary
public final int resultSetConsumedRows()

Implements org.jooq.DiagnosticsContext.resultSetConsumedRows.

Doc from org.jooq.DiagnosticsContext.resultSetConsumedRows.

The number of rows that were consumed from resultSet(), or -1 if there was no result set.

Annotations
@Override
resultSetFetchedColumnCountback to summary
public final int resultSetFetchedColumnCount()

Implements org.jooq.DiagnosticsContext.resultSetFetchedColumnCount.

Doc from org.jooq.DiagnosticsContext.resultSetFetchedColumnCount.

The number of columns that were actually available from resultSet(), or -1 if there was no result set.

Annotations
@Override
resultSetFetchedColumnNamesback to summary
public final List<String> resultSetFetchedColumnNames()

Implements org.jooq.DiagnosticsContext.resultSetFetchedColumnNames.

Doc from org.jooq.DiagnosticsContext.resultSetFetchedColumnNames.

The number of columns that were actually available from resultSet(), or -1 if there was no result set.

Annotations
@Override
resultSetFetchedRowsback to summary
public final int resultSetFetchedRows()

Implements org.jooq.DiagnosticsContext.resultSetFetchedRows.

Doc from org.jooq.DiagnosticsContext.resultSetFetchedRows.

The number of rows that were actually available from resultSet(), 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 of resultSet() is not possible (e.g. because the driver supports only ResultSet#TYPE_FORWARD_ONLY), then this will return the same value as resultSetConsumedRows().

Annotations
@Override
resultSetMissingWasNullCallback to summary
public final boolean resultSetMissingWasNullCall()

Implements org.jooq.DiagnosticsContext.resultSetMissingWasNullCall.

Doc from org.jooq.DiagnosticsContext.resultSetMissingWasNullCall.

There had been a missing ResultSet#wasNull() call on a previously consumed primitive type, which is reported to be ResultSetMetaData#isNullable(int).

resultSetColumnIndex() will return the relevant column index for which the ResultSet#wasNull() call was missing.

Annotations
@Override
resultSetUnnecessaryWasNullCallback to summary
public final boolean resultSetUnnecessaryWasNullCall()

Implements org.jooq.DiagnosticsContext.resultSetUnnecessaryWasNullCall.

Doc from org.jooq.DiagnosticsContext.resultSetUnnecessaryWasNullCall.

There had been an unnecessary ResultSet#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 the ResultSet#wasNull() call was missing.

Annotations
@Override
transformedPartback to summary
public final QueryPart transformedPart()

Implements org.jooq.DiagnosticsContext.transformedPart.

Doc from org.jooq.DiagnosticsContext.transformedPart.

The transformed object from part() if available, or null, if there was no specific transformation to attach the diagnostic to.

This helps diagnosing pattern transformations as indicated by DiagnosticsListener#transformPattern(DiagnosticsContext).

Annotations
@Override