|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExecuteListener
An event listener for Query, Routine, or ResultSet
render, prepare, bind, execute, fetch steps.
ExecuteListener is a base type for loggers, debuggers,
profilers, data collectors that can be hooked into a jOOQ Factory
using the Settings.getExecuteListeners() property, passing
Settings to
Factory.Factory(java.sql.Connection, SQLDialect, Settings). Advanced
ExecuteListeners can also provide custom implementations of
Connection, PreparedStatement and ResultSet to jOOQ
in apropriate methods. For convenience, consider extending
DefaultExecuteListener instead of implementing this interface. This
will prevent compilation errors in future versions of jOOQ, when this
interface might get new methods.
The following table explains how every type of statement / operation invokes
callback methods in the correct order for all registered
ExecuteListeners. Find a legend below the table for the various
use cases.
| Callback method | Use case [1] | Use case [2] | Use case [3] | Use case [4] | Use case [5] | Use case [6] |
|---|---|---|---|---|---|---|
start(ExecuteContext) |
Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x |
renderStart(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, Nx (for every query) | Yes, 1x |
renderEnd(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, Nx (for every query) | Yes, 1x |
prepareStart(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, Nx (for every query) | Yes, 1x |
prepareEnd(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, Nx (for every query) | Yes, 1x |
bindStart(ExecuteContext) |
Yes, 1x | No | No | Yes, Nx (for every value set) | No | Yes, 1x |
bindEnd(ExecuteContext) |
Yes, 1x | No | No | Yes, Nx (for every value set) | No | Yes, 1 |
executeStart(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, 1x | Yes, 1x |
executeEnd(ExecuteContext) |
Yes, 1x | Yes, 1x | No | Yes, 1x | Yes, 1x | Yes, 1x |
fetchStart(ExecuteContext) |
Yes, 1x (Nx for ResultQuery.fetchMany() |
Yes, 1x (Nx for ResultQuery.fetchMany() |
Yes, 1x | No | No | No |
resultStart(ExecuteContext) |
Yes, 1x (Nx for Cursor.fetch(int) |
Yes, 1x (Nx for Cursor.fetch(int) |
Yes, 1x | No | No | No |
recordStart(ExecuteContext) |
Yes, Nx | Yes, Nx | Yes, Nx | No | No | No |
recordEnd(ExecuteContext) |
Yes, Nx | Yes, Nx | Yes, Nx | No | No | No |
resultEnd(ExecuteContext) |
Yes, 1x (Nx for Cursor.fetch(int) |
Yes, 1x (Nx for Cursor.fetch(int) |
Yes, 1x | No | No | No |
fetchEnd(ExecuteContext) |
Yes, 1x (Nx for ResultQuery.fetchMany() |
Yes, 1x (Nx for ResultQuery.fetchMany() |
Yes, 1x | No | No | No |
end(ExecuteContext) |
Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x | Yes, 1x |
ResultQuery of statement type
StatementType.PREPARED_STATEMENTResultQuery of statement type
StatementType.STATIC_STATEMENTFactory.fetch(ResultSet) or with
InsertResultStep.fetch()Factory.batch(Query)Factory.batch(Query[])Routine standalone call
If nothing is specified, the default is to use LoggerListener and
StopWatchListener as the only event listeners.
| Method Summary | |
|---|---|
void |
bindEnd(ExecuteContext ctx)
Called after binding variables to the PreparedStatement
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
bindStart(ExecuteContext ctx)
Called before binding variables to the PreparedStatement
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
end(ExecuteContext ctx)
Called at the end of the execution lifecycle.. |
void |
executeEnd(ExecuteContext ctx)
Called after executing a statement Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
executeStart(ExecuteContext ctx)
Called before executing a statement Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
fetchEnd(ExecuteContext ctx)
Called after fetching data from a ResultSet. |
void |
fetchStart(ExecuteContext ctx)
Called before fetching data from a ResultSet. |
void |
prepareEnd(ExecuteContext ctx)
Called after preparing / creating the SQL statement Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
prepareStart(ExecuteContext ctx)
Called before preparing / creating the SQL statement Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
recordEnd(ExecuteContext ctx)
Called after fetching a record from a ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
recordStart(ExecuteContext ctx)
Called before fetching a record from a ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
renderEnd(ExecuteContext ctx)
Called after rendering SQL from a QueryPart
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
renderStart(ExecuteContext ctx)
Called before rendering SQL from a QueryPart
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
|
void |
resultEnd(ExecuteContext ctx)
Called after fetching a set of records from a ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
resultStart(ExecuteContext ctx)
Called before fetching a set of records from a ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
ExecuteContext.sql(): The rendered SQL statement
that is about to be executed, or null if the
SQL statement is unknown.. |
void |
start(ExecuteContext ctx)
Called to initialise an ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
execution
ExecuteContext.configuration(): The execution configuration
ExecuteContext.query(): The Query object, if a
jOOQ query is being executed or null otherwise
ExecuteContext.routine(): The Routine object, if
a jOOQ routine is being executed or null otherwise
Overridable attributes in ExecuteContext:
ExecuteContext.setConnection(Connection): The connection used
for execution. |
| Method Detail |
|---|
void start(ExecuteContext ctx)
ExecuteListener
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.setConnection(Connection): The connection used
for execution. This may be particularly interesting if a Query
was de-serialised and is thus lacking the underlying connection
void renderStart(ExecuteContext ctx)
QueryPart
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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 otherwise
void renderEnd(ExecuteContext ctx)
QueryPart
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
void prepareStart(ExecuteContext ctx)
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
void prepareEnd(ExecuteContext ctx)
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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 wrapper
void bindStart(ExecuteContext ctx)
PreparedStatement
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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
void bindEnd(ExecuteContext ctx)
PreparedStatement
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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
Note that this method is not called when executing queries of type
StatementType.STATIC_STATEMENT
void executeStart(ExecuteContext ctx)
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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
void executeEnd(ExecuteContext ctx)
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
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
void fetchStart(ExecuteContext ctx)
ResultSet.
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
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.
void resultStart(ExecuteContext ctx)
ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
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.fetchOne() for instance.
void recordStart(ExecuteContext ctx)
ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.Note that this method is not called when executing queries that do not return a result, or when executing routines.
void recordEnd(ExecuteContext ctx)
ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.Note that this method is not called when executing queries that do not return a result, or when executing routines.
void resultEnd(ExecuteContext ctx)
ResultSet
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.
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.fetchOne() for instance.
void fetchEnd(ExecuteContext ctx)
ResultSet.
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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.record(): The last Record that
was fetched.ExecuteContext.result(): The last set of records that were
fetched.
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.
void end(ExecuteContext ctx)
Available attributes from ExecuteContext:
ExecuteContext.getConnection(): The connection used for
executionExecuteContext.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
if any ResultSet is already closed!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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||