com.mysql.cj

## Interface BindValue

    public interface BindValue

### Method Summary

All Methods Instance Methods Abstract Methods
`BindValue` `clone()`
`boolean` `escapeBytesIfNeeded()`
`long` `getBinaryLength()` Gets the length of this bind value in the binary protocol representation.
`long` `getBoundBeforeExecutionNum()`
`byte[]` `getByteValue()`
`Calendar` `getCalendar()`
`Field` `getField()`
`int` `getFieldType()`
`MysqlType` `getMysqlType()`
`String` `getName()` Gets the name of this query attribute.
`long` `getScaleOrLength()`
`String` `getString()` Get a String representation of the value.
`long` `getTextLength()` Gets the length of this bind value in the text protocol representation.
`Object` `getValue()`
`boolean` `isNational()`
`boolean` `isNull()`
`boolean` `isSet()`
`boolean` `isStream()`
`boolean` `keepOrigNanos()`
`void` `reset()`
`void` `setBinding(Object obj, MysqlType type, int numberOfExecutions, AtomicBoolean sendTypesToServer)`
`void` `setCalendar(Calendar cal)`
`void` `setEscapeBytesIfNeeded(boolean val)`
`void` `setField(Field field)`
`void` `setIsNational(boolean isNational)`
`void` `setKeepOrigNanos(boolean value)` Should the value keep original fractional seconds ignoring sendFractionalSeconds and sendFractionalSecondsForTime?
`void` `setMysqlType(MysqlType type)`
`void` `setName(String name)`
`void` `setNull(boolean isNull)`
`void` `setScaleOrLength(long scaleOrLength)`
`void` `writeAsBinary(Message intoMessage)`
`void` `writeAsQueryAttribute(Message intoMessage)`
`void` `writeAsText(Message intoMessage)`

### Method Detail

#### clone

    BindValue clone()

#### reset

    void reset()

#### isNull

    boolean isNull()

#### setNull

    void setNull(boolean isNull)

#### isStream

    boolean isStream()

#### getMysqlType

    MysqlType getMysqlType()

#### setMysqlType

    void setMysqlType(MysqlType type)

#### getByteValue

    byte[] getByteValue()

#### isSet

    boolean isSet()

#### setBinding

    void setBinding(Object obj,
                    MysqlType type,
                    int numberOfExecutions,
                    AtomicBoolean sendTypesToServer)

#### getCalendar

    Calendar getCalendar()

#### setCalendar

    void setCalendar(Calendar cal)

#### escapeBytesIfNeeded

    boolean escapeBytesIfNeeded()

#### setEscapeBytesIfNeeded

    void setEscapeBytesIfNeeded(boolean val)

#### getValue

    Object getValue()

#### isNational

    boolean isNational()

#### setIsNational

    void setIsNational(boolean isNational)

#### getFieldType

    int getFieldType()

#### getTextLength

    long getTextLength()

Gets the length of this bind value in the text protocol representation.

Returns:
  the expected length, in bytes, of this bind value after being encoded.

#### getBinaryLength

    long getBinaryLength()

Gets the length of this bind value in the binary protocol representation.

Returns:
  the expected length, in bytes, of this bind value after being encoded.

#### getBoundBeforeExecutionNum

    long getBoundBeforeExecutionNum()

#### getString

    String getString()

Get a String representation of the value.

Returns:
  value as a String

#### getField

    Field getField()

#### setField

    void setField(Field field)

#### keepOrigNanos

    boolean keepOrigNanos()

#### setKeepOrigNanos

    void setKeepOrigNanos(boolean value)

Should the value keep original fractional seconds ignoring sendFractionalSeconds and sendFractionalSecondsForTime?

If the value is a part of key for UpdatableResultSet updater, it should keep original milliseconds.

Parameters:
  `value` - the value to set

#### setScaleOrLength

    void setScaleOrLength(long scaleOrLength)

#### getScaleOrLength

    long getScaleOrLength()

#### getName

    String getName()

Gets the name of this query attribute.

Returns:
  the name of this query attribute.

#### setName

    void setName(String name)

#### writeAsText

    void writeAsText(Message intoMessage)

#### writeAsBinary

    void writeAsBinary(Message intoMessage)

#### writeAsQueryAttribute

    void writeAsQueryAttribute(Message intoMessage)

Copyright © 2016, 2024, Oracle and/or its affiliates.