- All Superinterfaces:
Scope
- All Known Subinterfaces:
BindingGetResultSetContext<U>,BindingGetSQLInputContext<U>,BindingGetStatementContext<U>,BindingRegisterContext<U>,BindingSetSQLOutputContext<U>,BindingSetStatementContext<U>,BindingSQLContext<U>
A Interactions with other
Scope that lives in the context of a data type Binding
operation.
Known subtypes of various binding operations
The various Binding operations and their corresponding
BindingScope subtypes include:
Binding.sql(BindingSQLContext)withBindingSQLContextto generate the SQL string for a bind value.Binding.set(BindingSetStatementContext)withBindingSetStatementContextto set the bind value to the JDBCPreparedStatement.Binding.set(BindingSetSQLOutputContext)withBindingSetSQLOutputContextto write the bind value to a JDBCSQLOutput(used forUDT).Binding.register(BindingRegisterContext)withBindingRegisterContextto register a proceduralOUTparameter on a JDBCCallableStatement.Binding.get(BindingGetResultSetContext)withBindingGetResultSetContextto read a result value from a JDBCResultSet.Binding.get(BindingGetSQLInputContext)withBindingGetSQLInputContextto read a result value from a JDBCSQLInput(used forUDT).Binding.get(BindingGetStatementContext)withBindingGetStatementContextto read a proceduralOUTargument from a JDBCCallableStatement.
Lifecycle
The variousBinding operations are very short
lived operations and thus this scope is also very short lived, although some
implementations (e.g. BindingGetResultSetContext) may be cached for
the duration of an ExecuteScope for performance reasons.
The Scope.data() map is that of the parent scope, which is:
- The
ContextforBindingSQLContext - The
ExecuteScopefor all the others
This allows for interacting with the rendering lifecycle or the execution
lifecycle from within a custom data type Binding.
Interactions with other Scope types
Most but not all BindingScope types are also ExecuteScope.
Specifically, the BindingSQLContext type isn't an
ExecuteScope because it can also be used in non-execution use-cases,
such as DSLContext.render(QueryPart), where a bind value needs to
render its SQL to the output SQL string, without the SQL string ever being
executed.
- Author:
- Lukas Eder
-
Method Summary
Methods inherited from interface org.jooq.Scope
configuration, creationTime, data, data, data, dialect, dsl, family, settings