程序包 com.mysql.cj

接口 QueryAttributesBindings

    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      void clearAttributes()
      Removes all query attributes from the query attributes list.
      BindValue getAttributeValue​(int index)
      Returns an internal representation of the query attribute in the given position of the query attributes list.
      int getCount()
      Get the count of query attributes in the list.
      void runThroughAll​(java.util.function.Consumer<BindValue> bindAttribute)
      Runs through all query attributes while feeding the given Consumer with each one of them.
      void setAttribute​(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 BindValue in 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 given Consumer with each one of them.
        参数:
        bindAttribute - A Consumer for each one of the single query attributes.
      • clearAttributes

        void clearAttributes()
        Removes all query attributes from the query attributes list.