public final class CallbackExecuteListener extends java.lang.Object implements ExecuteListener
ExecuteListener that allows for functional composition.
For example:
ExecuteListener listener = new CallbackExecuteListener()
.onExecuteStart(ctx -> something())
.onExecuteEnd(ctx -> something());
| Constructor and Description |
|---|
CallbackExecuteListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindEnd(ExecuteContext ctx)
Called after bind variables to the
PreparedStatement. |
void |
bindStart(ExecuteContext ctx)
Called before bind variables to the
PreparedStatement. |
void |
end(ExecuteContext ctx)
Called at the end of the execution lifecycle.
|
void |
exception(ExecuteContext ctx)
Called in the event of an exception at any moment of the execution
lifecycle.
|
void |
executeEnd(ExecuteContext ctx)
Called after executing a statement.
|
void |
executeStart(ExecuteContext ctx)
Called before executing a statement.
|
void |
fetchEnd(ExecuteContext ctx)
Called after fetching data from a
ResultSet. |
void |
fetchStart(ExecuteContext ctx)
Called before fetching data from a
ResultSet. |
CallbackExecuteListener |
onBindEnd(ExecuteEventHandler newOnBindEnd) |
CallbackExecuteListener |
onBindStart(ExecuteEventHandler newOnBindStart) |
CallbackExecuteListener |
onEnd(ExecuteEventHandler newOnEnd) |
CallbackExecuteListener |
onException(ExecuteEventHandler newOnException) |
CallbackExecuteListener |
onExecuteEnd(ExecuteEventHandler newOnExecuteEnd) |
CallbackExecuteListener |
onExecuteStart(ExecuteEventHandler newOnExecuteStart) |
CallbackExecuteListener |
onFetchEnd(ExecuteEventHandler newOnFetchEnd) |
CallbackExecuteListener |
onFetchStart(ExecuteEventHandler newOnFetchStart) |
CallbackExecuteListener |
onOutEnd(ExecuteEventHandler newOnOutEnd) |
CallbackExecuteListener |
onOutStart(ExecuteEventHandler newOnOutStart) |
CallbackExecuteListener |
onPrepareEnd(ExecuteEventHandler newOnPrepareEnd) |
CallbackExecuteListener |
onPrepareStart(ExecuteEventHandler newOnPrepareStart) |
CallbackExecuteListener |
onRecordEnd(ExecuteEventHandler newOnRecordEnd) |
CallbackExecuteListener |
onRecordStart(ExecuteEventHandler newOnRecordStart) |
CallbackExecuteListener |
onRenderEnd(ExecuteEventHandler newOnRenderEnd) |
CallbackExecuteListener |
onRenderStart(ExecuteEventHandler newOnRenderStart) |
CallbackExecuteListener |
onResultEnd(ExecuteEventHandler newOnResultEnd) |
CallbackExecuteListener |
onResultStart(ExecuteEventHandler newOnResultStart) |
CallbackExecuteListener |
onStart(ExecuteEventHandler newOnStart) |
CallbackExecuteListener |
onWarning(ExecuteEventHandler newOnWarning) |
void |
outEnd(ExecuteContext ctx)
Called after fetching out parameter values from a
CallableStatement. |
void |
outStart(ExecuteContext ctx)
Called before fetching out parameter values from a
CallableStatement. |
void |
prepareEnd(ExecuteContext ctx)
Called after preparing / creating the SQL statement.
|
void |
prepareStart(ExecuteContext ctx)
Called before preparing / creating the SQL statement.
|
void |
recordEnd(ExecuteContext ctx)
Called after fetching a record from a
ResultSet. |
void |
recordStart(ExecuteContext ctx)
Called before fetching a record from a
ResultSet. |
void |
renderEnd(ExecuteContext ctx)
Called after rendering SQL from a
QueryPart. |
void |
renderStart(ExecuteContext ctx)
Called before rendering SQL from a
QueryPart. |
void |
resultEnd(ExecuteContext ctx)
Called after fetching a set of records from a
ResultSet. |
void |
resultStart(ExecuteContext ctx)
Called before fetching a set of records from a
ResultSet. |
void |
start(ExecuteContext ctx)
Called to initialise an
ExecuteListener. |
void |
warning(ExecuteContext ctx)
Called in the event of a warning at any moment of the execution
lifecycle.
|
public final void start(ExecuteContext ctx)
ExecuteListenerExecuteListener.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext:
ExecuteContext.connectionProvider(ConnectionProvider): The
connection provider used for execution. This may be particularly
interesting if a Query was de-serialised and is thus lacking the
underlying connectionstart in interface ExecuteListenerpublic final void renderStart(ExecuteContext ctx)
ExecuteListenerQueryPart.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiserenderStart in interface ExecuteListenerpublic final void renderEnd(ExecuteContext ctx)
ExecuteListenerQueryPart.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..
Overridable attributes in ExecuteContext:
ExecuteContext.sql(String): The rendered SQL
statement that is about to be executed. You can modify this statement
freely.renderEnd in interface ExecuteListenerpublic final void prepareStart(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..
Overridable attributes in ExecuteContext:
ExecuteContext.sql(String): The rendered SQL
statement that is about to be executed. You can modify this statement
freely.prepareStart in interface ExecuteListenerpublic final void prepareEnd(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ Routine
Overridable attributes in ExecuteContext:
ExecuteContext.statement(PreparedStatement): The
Statement, PreparedStatement, or
CallableStatement that is about to be executed. You can
modify this statement freely, or wrap ExecuteContext.statement()
with your enriched statement wrapperprepareEnd in interface ExecuteListenerpublic final void bindStart(ExecuteContext ctx)
ExecuteListenerPreparedStatement.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ Routine
Overridable attributes in ExecuteContext:
ExecuteContext.statement(PreparedStatement): The
PreparedStatement, or CallableStatement that is
about to be executed. You can modify this statement freely, or wrap
ExecuteContext.statement() with your enriched statement wrapper
Note that this method is not called when executing queries of type
StatementType.STATIC_STATEMENT
bindStart in interface ExecuteListenerpublic final void bindEnd(ExecuteContext ctx)
ExecuteListenerPreparedStatement.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ Routine
Overridable attributes in ExecuteContext:
ExecuteContext.statement(PreparedStatement): The
Statement, PreparedStatement, or
CallableStatement that is about to be executed. You can
modify this statement freely, or wrap ExecuteContext.statement()
with your enriched statement wrapper
Note that this method is not called when executing queries of type
StatementType.STATIC_STATEMENT
bindEnd in interface ExecuteListenerpublic final void executeStart(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ Routine
Overridable attributes in ExecuteContext:
ExecuteContext.statement(PreparedStatement): The
Statement, PreparedStatement, or
CallableStatement that is about to be executed. You can
modify this statement freely, or wrap ExecuteContext.statement()
with your enriched statement wrapperexecuteStart in interface ExecuteListenerpublic final void executeEnd(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched or null, if the Query
returns no result set, or if a Routine is being executed.ExecuteContext.rows(): The number of affected rows if
applicable. In case a ResultSet is fetched, this number is only
available at the ExecuteListener.fetchEnd(ExecuteContext) event.
Overridable attributes in ExecuteContext:
ExecuteContext.resultSet(ResultSet): The
ResultSet that is about to be fetched. You can modify this
result set freely, or wrap ExecuteContext.resultSet() with your
enriched result set wrapperexecuteEnd in interface ExecuteListenerpublic final void outStart(ExecuteContext ctx)
ExecuteListenerCallableStatement.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.Note that this method is called only when executing standalone routine calls.
outStart in interface ExecuteListenerpublic final void outEnd(ExecuteContext ctx)
ExecuteListenerCallableStatement.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.Note that this method is called only when executing standalone routine calls.
outEnd in interface ExecuteListenerpublic final void fetchStart(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.
Overridable attributes in ExecuteContext:
ExecuteContext.resultSet(ResultSet): The
ResultSet that is about to be fetched. You can modify this
result set freely, or wrap ExecuteContext.resultSet() with your
enriched result set wrapper
In case of multiple ResultSets with
ResultQuery.fetchMany(), this is called several times, once per
ResultSet
Note that this method is not called when executing queries that do not return a result, or when executing routines.
fetchStart in interface ExecuteListenerpublic final void resultStart(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched.ExecuteContext.result(): The set of records that are about to
be fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.
Note that this method is not called when executing queries that do not
return a result, or when executing routines. This is also not called when
fetching single records, with Cursor.fetchNext() for instance.
resultStart in interface ExecuteListenerpublic final void recordStart(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched.ExecuteContext.record(): The Record that is
about to be fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.Note that this method is not called when executing queries that do not return a result, or when executing routines.
recordStart in interface ExecuteListenerpublic final void recordEnd(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched.ExecuteContext.record(): The last Record that
was fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.Note that this method is not called when executing queries that do not return a result, or when executing routines.
recordEnd in interface ExecuteListenerpublic final void resultEnd(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineExecuteContext.resultSet(): The ResultSet that
is about to be fetched.ExecuteContext.record(): The last Record that
was fetched.ExecuteContext.result(): The set of records that were
fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.
Note that this method is not called when executing queries that do not
return a result, or when executing routines. This is also not called when
fetching single records, with Cursor.fetchNext() for instance.
resultEnd in interface ExecuteListenerpublic final void fetchEnd(ExecuteContext ctx)
ExecuteListenerResultSet.
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineStatement is already closed!ExecuteContext.resultSet(): The ResultSet that
was fetched. Note that the ResultSet is already closed!ExecuteContext.rows(): The number of affected rows if
applicable.ExecuteContext.record(): The last Record that
was fetched.ExecuteContext.result(): The last set of records that were
fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.
In case of multiple ResultSets with
ResultQuery.fetchMany(), this is called several times, once per
ResultSet
Note that this method is not called when executing queries that do not return a result, or when executing routines.
fetchEnd in interface ExecuteListenerpublic final void end(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineStatement is already closed!ExecuteContext.resultSet(): The ResultSet that
was fetched or null, if no result set was fetched. Note that
the ResultSet may already be closed!ExecuteContext.rows(): The number of affected rows if
applicable.ExecuteContext.record(): The last Record that
was fetched or null if no records were fetched.ExecuteContext.result(): The last set of records that were
fetched or null if no records were fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the database or null if no warning was emitted.end in interface ExecuteListenerpublic final void exception(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineStatement may be closed!ExecuteContext.resultSet(): The ResultSet that
was fetched or null, if no result set was fetched. Note that
the ResultSet may already be closed!ExecuteContext.rows(): The number of affected rows if
applicable.ExecuteContext.record(): The last Record that
was fetched or null if no records were fetched.ExecuteContext.result(): The last set of records that were
fetched or null if no records were fetched.ExecuteContext.exception(): The RuntimeException that
is about to be thrownExecuteContext.sqlException(): The SQLException that
was thrown by the databaseexception in interface ExecuteListenerpublic final void warning(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.connection(): The connection used for
executionScope.configuration(): The execution configurationExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwiseExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwiseExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown..ExecuteContext.statement(): The
PreparedStatement that is about to be executed, or
null if no statement is known to jOOQ. This can be any of
the following: java.sql.PreparedStatement from your JDBC driver when
a jOOQ Query is being executed as
StatementType.PREPARED_STATEMENTjava.sql.Statement from your JDBC driver wrapped in a
java.sql.PreparedStatement when your jOOQ Query
is being executed as StatementType.STATIC_STATEMENTjava.sql.CallableStatement when you are executing a
jOOQ RoutineStatement may be closed!ExecuteContext.resultSet(): The ResultSet that
was fetched or null, if no result set was fetched. Note that
the ResultSet may already be closed!ExecuteContext.rows(): The number of affected rows if
applicable.ExecuteContext.record(): The last Record that
was fetched or null if no records were fetched.ExecuteContext.result(): The last set of records that were
fetched or null if no records were fetched.ExecuteContext.sqlWarning(): The SQLWarning that was
emitted by the databaseExecuteContext.exception(): The RuntimeException that
is about to be thrown or null, if no exception is being
thrown.ExecuteContext.sqlException(): The SQLException that
was thrown by the database or null, if no exception is being
thrown.
This method is only invoked if a warning appears. Note that fetching of
warnings can be disabled using Settings.isFetchWarnings()
warning in interface ExecuteListenerpublic final CallbackExecuteListener onStart(ExecuteEventHandler newOnStart)
public final CallbackExecuteListener onRenderStart(ExecuteEventHandler newOnRenderStart)
public final CallbackExecuteListener onRenderEnd(ExecuteEventHandler newOnRenderEnd)
public final CallbackExecuteListener onPrepareStart(ExecuteEventHandler newOnPrepareStart)
public final CallbackExecuteListener onPrepareEnd(ExecuteEventHandler newOnPrepareEnd)
public final CallbackExecuteListener onBindStart(ExecuteEventHandler newOnBindStart)
public final CallbackExecuteListener onBindEnd(ExecuteEventHandler newOnBindEnd)
public final CallbackExecuteListener onExecuteStart(ExecuteEventHandler newOnExecuteStart)
public final CallbackExecuteListener onExecuteEnd(ExecuteEventHandler newOnExecuteEnd)
public final CallbackExecuteListener onOutStart(ExecuteEventHandler newOnOutStart)
public final CallbackExecuteListener onOutEnd(ExecuteEventHandler newOnOutEnd)
public final CallbackExecuteListener onFetchStart(ExecuteEventHandler newOnFetchStart)
public final CallbackExecuteListener onResultStart(ExecuteEventHandler newOnResultStart)
public final CallbackExecuteListener onRecordStart(ExecuteEventHandler newOnRecordStart)
public final CallbackExecuteListener onRecordEnd(ExecuteEventHandler newOnRecordEnd)
public final CallbackExecuteListener onResultEnd(ExecuteEventHandler newOnResultEnd)
public final CallbackExecuteListener onFetchEnd(ExecuteEventHandler newOnFetchEnd)
public final CallbackExecuteListener onEnd(ExecuteEventHandler newOnEnd)
public final CallbackExecuteListener onException(ExecuteEventHandler newOnException)
public final CallbackExecuteListener onWarning(ExecuteEventHandler newOnWarning)
Copyright © 2018. All Rights Reserved.