- java.lang.Object
- 
- org.jooq.impl.ClobBinding
 
- 
- All Implemented Interfaces:
- Serializable,- Binding<String,String>
 
 public class ClobBinding extends Object implements Binding<String,String> A binding that takes binary values but binds them asClobto at the JDBC level.This is useful for workarounds for bugs in Oracle, like ORA-01461: can bind a LONG value only for insert into a LONG column (see [#4091]) - Author:
- Lukas Eder
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ClobBinding()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Converter<String,String>converter()A converter that can convert between the database type and the custom type.voidget(BindingGetResultSetContext<String> ctx)Get aResultSet'sOUTvalue.voidget(BindingGetSQLInputContext<String> ctx)Get aSQLInput'sOUTvalue.voidget(BindingGetStatementContext<String> ctx)Get aCallableStatement'sOUTvalue.voidregister(BindingRegisterContext<String> ctx)Register aCallableStatement'sOUTparameter.voidset(BindingSetSQLOutputContext<String> ctx)Set aSQLOutput'sINparameter.voidset(BindingSetStatementContext<String> ctx)Set aPreparedStatement'sINparameter.voidsql(BindingSQLContext<String> ctx)Generate SQL code for the bind variable.
 
- 
- 
- 
Method Detail- 
converterpublic final Converter<String,String> converter() Description copied from interface:BindingA converter that can convert between the database type and the custom type.
 - 
sqlpublic final void sql(BindingSQLContext<String> ctx) throws SQLException Description copied from interface:BindingGenerate SQL code for the bind variable.Implementations should generate SQL code onto BindingSQLContext.render(), given the context's bind variable located atBindingSQLContext.value(). Examples of such SQL code are:- "?": Default implementations can simply generate a question mark.
 
 
- "123": Implementations may choose to inline bind variables to influence execution plan generation.
 
 - RenderContext.paramType()contains information whether inlined bind variables are expected in the current context.
 
 
- "CAST(? AS DATE)": Cast a database to a more specific type. This can be useful in databases like Oracle, which map both- DATEand- TIMESTAMPSQL types to- Timestamp.
 
 - RenderContext.castMode()may contain some hints about whether casting is suggested in the current context.
 
 
- "?::json": Vendor-specific bind variables can be supported, e.g.- SQLDialect.POSTGRES's JSON data type.
 Implementations must provide consistent behaviour between Binding.sql(BindingSQLContext)andBinding.set(BindingSetStatementContext), i.e. when bind variables are inlined, then they must not be bound to thePreparedStatementinBinding.set(BindingSetStatementContext)- Specified by:
- sqlin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
registerpublic final void register(BindingRegisterContext<String> ctx) throws SQLException Description copied from interface:BindingRegister aCallableStatement'sOUTparameter.- Specified by:
- registerin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
setpublic final void set(BindingSetStatementContext<String> ctx) throws SQLException Description copied from interface:BindingSet aPreparedStatement'sINparameter.- Specified by:
- setin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
setpublic final void set(BindingSetSQLOutputContext<String> ctx) throws SQLException Description copied from interface:BindingSet aSQLOutput'sINparameter.- Specified by:
- setin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
getpublic final void get(BindingGetResultSetContext<String> ctx) throws SQLException Description copied from interface:BindingGet aResultSet'sOUTvalue.Implementations are expected to produce a value by calling BindingGetResultSetContext.value(Object), passing the resulting value to the method.- Specified by:
- getin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
getpublic final void get(BindingGetStatementContext<String> ctx) throws SQLException Description copied from interface:BindingGet aCallableStatement'sOUTvalue.Implementations are expected to produce a value by calling BindingGetStatementContext.value(Object), passing the resulting value to the method.- Specified by:
- getin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 - 
getpublic final void get(BindingGetSQLInputContext<String> ctx) throws SQLException Description copied from interface:BindingGet aSQLInput'sOUTvalue.Implementations are expected to produce a value by calling BindingGetSQLInputContext.value(Object), passing the resulting value to the method.- Specified by:
- getin interface- Binding<String,String>
- Parameters:
- ctx- The context object containing all argument objects.
- Throws:
- SQLException- Implementations are allowed to pass on all- SQLExceptions to the caller to be wrapped in- DataAccessExceptions.
 
 
- 
 
-