public interface BindableOperation extends QueryOperation
QueryOperation
for operations that allow parameter substitution by binding parameter values.
BindableOperation
is typically created with a Set
of column names or parameter names that accept bind
parameters by calling #bind(Statement, String, Object)
.Statement.bind(java.lang.Object, java.lang.Object)
,
TODO: Refactor to {@link PreparedOperation}.
Modifier and Type | Method and Description |
---|---|
void |
bind(BindTarget bindTarget,
String identifier,
Object value)
Bind the given
value to the Statement using the underlying binding strategy. |
default void |
bind(BindTarget bindTarget,
String identifier,
SettableValue value)
Bind a
SettableValue to the Statement using the underlying binding strategy. |
void |
bindNull(BindTarget bindTarget,
String identifier,
Class<?> valueType)
Bind a null value to the
Statement using the underlying binding strategy. |
get, toQuery
void bind(BindTarget bindTarget, String identifier, Object value)
value
to the Statement
using the underlying binding strategy.bindTarget
- the bindTarget to bind the value to.identifier
- named identifier that is considered by the underlying binding strategy.value
- the actual value. Must not be null. Use #bindNull(Statement, Class)
for
null values.Statement.bind(java.lang.Object, java.lang.Object)
void bindNull(BindTarget bindTarget, String identifier, Class<?> valueType)
Statement
using the underlying binding strategy.bindTarget
- the bindTarget to bind the value to.identifier
- named identifier that is considered by the underlying binding strategy.valueType
- value type, must not be null.Statement.bindNull(java.lang.Object, java.lang.Class<?>)
default void bind(BindTarget bindTarget, String identifier, SettableValue value)
SettableValue
to the Statement
using the underlying binding strategy. Binds either the
SettableValue.getValue()
or null, depending on whether the value is null.bindTarget
- the bindTarget to bind the value to.value
- the settable valueStatement.bind(java.lang.Object, java.lang.Object)
,
Statement.bindNull(java.lang.Object, java.lang.Class<?>)
Copyright © 2018–2019 Pivotal Software, Inc.. All rights reserved.