Top Description Methods
org.jooq

public Interface DiagnosticsContext

extends Scope
Known Direct Implementers
org.jooq.impl.DefaultDiagnosticsContext
Imports
java.sql.ResultSet, .ResultSetMetaData, java.util.List, .Set, org.jetbrains.annotations.NotNull, .Nullable

A parameter object that is passed to DiagnosticsListener methods.
Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public @NotNull String
actualStatement()

The actual statement that is being executed.

public @NotNull Set<String>
duplicateStatements()

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

public @Nullable Throwable
exception()

The exception that occurred while diagnosing a statement.

public @NotNull String
message()

A message describing the diagnostics and the object in question.

public @NotNull String
normalisedStatement()

The normalised statement that all duplicates correspond to.

public @Nullable QueryPart
part()

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

public @NotNull List<String>
repeatedStatements()

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

public @Nullable ResultSet
resultSet()

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

public int
resultSetColumnIndex()

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

public int
resultSetConsumedColumnCount()

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

public @NotNull List<String>
resultSetConsumedColumnNames()

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

public int
resultSetConsumedRows()

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

public int
resultSetFetchedColumnCount()

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

public @NotNull List<String>
resultSetFetchedColumnNames()

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

public int
resultSetFetchedRows()

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

public boolean
resultSetMissingWasNullCall()

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

public boolean
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 @Nullable QueryPart
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.Scope:
configurationcreationTimedatadatadatadialectdslfamilysettings

Method Detail

actualStatementback to summary
public @NotNull String actualStatement()

The actual statement that is being executed.

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

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

This set is used by at least:

Annotations
@NotNull
exceptionback to summary
public @Nullable Throwable exception()

The exception that occurred while diagnosing a statement.

Annotations
@Nullable
messageback to summary
public @NotNull String message()

A message describing the diagnostics and the object in question.

Annotations
@NotNull
normalisedStatementback to summary
public @NotNull String normalisedStatement()

The normalised statement that all duplicates correspond to.

Annotations
@NotNull
partback to summary
public @Nullable QueryPart part()

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

Annotations
@Nullable
repeatedStatementsback to summary
public @NotNull List<String> repeatedStatements()

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

This set is used by at least:

Annotations
@NotNull
resultSetback to summary
public @Nullable ResultSet resultSet()

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

Annotations
@Nullable
resultSetColumnIndexback to summary
public int resultSetColumnIndex()

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

resultSetConsumedColumnCountback to summary
public int 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.

resultSetConsumedColumnNamesback to summary
public @NotNull List<String> 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
@NotNull
resultSetConsumedRowsback to summary
public int resultSetConsumedRows()

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

resultSetFetchedColumnCountback to summary
public int resultSetFetchedColumnCount()

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

resultSetFetchedColumnNamesback to summary
public @NotNull List<String> resultSetFetchedColumnNames()

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

Annotations
@NotNull
resultSetFetchedRowsback to summary
public int 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().

resultSetMissingWasNullCallback to summary
public boolean 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.

See Also
resultSetColumnIndex()
resultSetUnnecessaryWasNullCallback to summary
public boolean 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.

See Also
resultSetColumnIndex()
transformedPartback to summary
public @Nullable QueryPart 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
@Nullable