程序包 com.mysql.cj
接口 QueryAttributesBindings
-
- 所有已知实现类:
NativeQueryAttributesBindings
public interface QueryAttributesBindingsInstances of this interface keep the list of query attributes assigned to aStatementobject.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidclearAttributes()Removes all query attributes from the query attributes list.BindValuegetAttributeValue(int index)Returns an internal representation of the query attribute in the given position of the query attributes list.intgetCount()Get the count of query attributes in the list.voidrunThroughAll(java.util.function.Consumer<BindValue> bindAttribute)Runs through all query attributes while feeding the givenConsumerwith each one of them.voidsetAttribute(String name, Object value)Adds a new query attribute to the list of query attributes.
-
-
-
方法详细资料
-
setAttribute
void setAttribute(String name, Object value)
Adds a new query attribute to the list of query attributes. Implementations must validate the type of the given the object and reject it or replace it by another representation if not supported, by its String version, for example. Query attribute names are not checked for duplication.- 参数:
name- the query attribute name.value- the query attribute value.
-
getCount
int getCount()
Get the count of query attributes in the list.- 返回:
- the number of query attributes existing in the list.
-
getAttributeValue
BindValue getAttributeValue(int index)
Returns an internal representation of the query attribute in the given position of the query attributes list. It's implementation dependent what to do when the index value is invalid.- 参数:
index- the position of the query attribute value to return.- 返回:
- the
BindValuein the given position of the query attributes list.
-
runThroughAll
void runThroughAll(java.util.function.Consumer<BindValue> bindAttribute)
Runs through all query attributes while feeding the givenConsumerwith each one of them.- 参数:
bindAttribute- AConsumerfor each one of the single query attributes.
-
clearAttributes
void clearAttributes()
Removes all query attributes from the query attributes list.
-
-