Top Fields Constructors Methods
com.mysql.cj

public Class NativeQueryAttributesBindings

extends Object
implements QueryAttributesBindings
Class Inheritance
All Implemented Interfaces
com.mysql.cj.QueryAttributesBindings
Imports
java.math.BigDecimal, .BigInteger, java.time.Duration, .Instant, .LocalDate, .LocalDateTime, .LocalTime, .OffsetDateTime, .OffsetTime, .ZonedDateTime, java.util.ArrayList, .HashMap, .List, .Map, .Map.Entry, .Optional, java.util.function.Consumer

Field Summary

Modifier and TypeField and Description
private List<NativeQueryBindValue>
private static final Map<Class<?>, MysqlType>
pack-priv Session

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clearAttributes()

Implements com.mysql.cj.QueryAttributesBindings.clearAttributes.

Removes all query attributes from the query attributes list.

public boolean
containsAttribute(String
the query attribute name.
name
)

Implements com.mysql.cj.QueryAttributesBindings.containsAttribute.

Checks if there is already an attribute with the specified name.

public BindValue
getAttributeValue(int
the position of the query attribute value to return.
index
)

Implements com.mysql.cj.QueryAttributesBindings.getAttributeValue.

Returns an internal representation of the query attribute in the given position of the query attributes list.

public int
getCount()

Implements com.mysql.cj.QueryAttributesBindings.getCount.

Get the count of query attributes in the list.

public void
removeAttribute(String
the query attribute name.
name
)

Implements com.mysql.cj.QueryAttributesBindings.removeAttribute.

Removes the specified query attribute from the list of query attributes.

public void
runThroughAll(Consumer<BindValue>
A Consumer for each one of the single query attributes.
bindAttribute
)

Implements com.mysql.cj.QueryAttributesBindings.runThroughAll.

Runs through all query attributes while feeding the given Consumer with each one of them.

public void
setAttribute(String
the query attribute name.
name
,
Object
the query attribute value.
value
)

Implements com.mysql.cj.QueryAttributesBindings.setAttribute.

Adds a new query attribute to the list of query attributes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindAttributesback to summary
private List<NativeQueryBindValue> bindAttributes
DEFAULT_MYSQL_TYPESback to summary
private static final Map<Class<?>, MysqlType> DEFAULT_MYSQL_TYPES
sessionback to summary
pack-priv Session session

Constructor Detail

NativeQueryAttributesBindingsback to summary
public NativeQueryAttributesBindings(Session sess)

Method Detail

clearAttributesback to summary
public void clearAttributes()

Implements com.mysql.cj.QueryAttributesBindings.clearAttributes.

Doc from com.mysql.cj.QueryAttributesBindings.clearAttributes.

Removes all query attributes from the query attributes list.

Annotations
@Override
containsAttributeback to summary
public boolean containsAttribute(String name)

Implements com.mysql.cj.QueryAttributesBindings.containsAttribute.

Doc from com.mysql.cj.QueryAttributesBindings.containsAttribute.

Checks if there is already an attribute with the specified name.

Parameters
name:String

the query attribute name.

Returns:boolean

true if the specified attribute name already exists.

Annotations
@Override
getAttributeValueback to summary
public BindValue getAttributeValue(int index)

Implements com.mysql.cj.QueryAttributesBindings.getAttributeValue.

Doc from com.mysql.cj.QueryAttributesBindings.getAttributeValue.

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.

Parameters
index:int

the position of the query attribute value to return.

Returns:BindValue

the BindValue in the given position of the query attributes list.

Annotations
@Override
getCountback to summary
public int getCount()

Implements com.mysql.cj.QueryAttributesBindings.getCount.

Doc from com.mysql.cj.QueryAttributesBindings.getCount.

Get the count of query attributes in the list.

Returns:int

the number of query attributes existing in the list.

Annotations
@Override
removeAttributeback to summary
public void removeAttribute(String name)

Implements com.mysql.cj.QueryAttributesBindings.removeAttribute.

Doc from com.mysql.cj.QueryAttributesBindings.removeAttribute.

Removes the specified query attribute from the list of query attributes.

Parameters
name:String

the query attribute name.

Annotations
@Override
runThroughAllback to summary
public void runThroughAll(Consumer<BindValue> bindAttribute)

Implements com.mysql.cj.QueryAttributesBindings.runThroughAll.

Doc from com.mysql.cj.QueryAttributesBindings.runThroughAll.

Runs through all query attributes while feeding the given Consumer with each one of them.

Parameters
bindAttribute:Consumer<BindValue>

A Consumer for each one of the single query attributes.

Annotations
@Override
setAttributeback to summary
public void setAttribute(String name, Object value)

Implements com.mysql.cj.QueryAttributesBindings.setAttribute.

Doc from com.mysql.cj.QueryAttributesBindings.setAttribute.

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.

Parameters
name:String

the query attribute name.

value:Object

the query attribute value.

Annotations
@Override