- 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)
withBindingSQLContext
to generate the SQL string for a bind value.Binding.set(BindingSetStatementContext)
withBindingSetStatementContext
to set the bind value to the JDBCPreparedStatement
.Binding.set(BindingSetSQLOutputContext)
withBindingSetSQLOutputContext
to write the bind value to a JDBCSQLOutput
(used forUDT
).Binding.register(BindingRegisterContext)
withBindingRegisterContext
to register a proceduralOUT
parameter on a JDBCCallableStatement
.Binding.get(BindingGetResultSetContext)
withBindingGetResultSetContext
to read a result value from a JDBCResultSet
.Binding.get(BindingGetSQLInputContext)
withBindingGetSQLInputContext
to read a result value from a JDBCSQLInput
(used forUDT
).Binding.get(BindingGetStatementContext)
withBindingGetStatementContext
to read a proceduralOUT
argument 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
Context
forBindingSQLContext
- The
ExecuteScope
for 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
Modifier and TypeMethodDescriptionGet theConverterContext
from the context of thisBindingScope
.Methods inherited from interface org.jooq.Scope
configuration, creationTime, data, data, data, dialect, dsl, family, settings
-
Method Details
-
converterContext
ConverterContext converterContext()Get theConverterContext
from the context of thisBindingScope
.
-