Top Description Fields Constructors Methods
com.mysql.cj.protocol.a.result

public Class ByteArrayRow

extends AbstractResultsetRow
Class Inheritance
Imports
com.mysql.cj.exceptions.ExceptionInterceptor, com.mysql.cj.protocol.ValueDecoder, com.mysql.cj.protocol.a.MysqlBinaryValueDecoder, .MysqlTextValueDecoder, com.mysql.cj.protocol.result.AbstractResultsetRow, com.mysql.cj.result.ValueFactory

A RowHolder implementation that is for cached results (a-la mysql_store_result()).

Field Summary

Modifier and TypeField and Description
pack-priv byte[][]
Inherited from com.mysql.cj.protocol.result.AbstractResultsetRow:
exceptionInterceptormetadatavalueDecoderwasNull

Constructor Summary

AccessConstructor and Description
public
ByteArrayRow(byte[][] internalRowData, ExceptionInterceptor exceptionInterceptor, ValueDecoder valueDecoder)

public
ByteArrayRow(byte[][] internalRowData, ExceptionInterceptor exceptionInterceptor)

Method Summary

Modifier and TypeMethod and Description
public byte[]
getBytes(int
index of column (starting at 0) to return from.
index
)

Overrides default com.mysql.cj.result.Row.getBytes.

Returns the value at the given column as a byte array.

public boolean
getNull(int
of the column value (starting at 0) to check.
columnIndex
)

Implements com.mysql.cj.result.Row.getNull.

Check whether a column is NULL and update the 'wasNull' status.

public <T> T
getValue(int
index of column to retrieve value from (0-indexed, not JDBC 1-indexed)
columnIndex
,
ValueFactory<T>
value factory used to create the return value after decoding
vf
)

Implements com.mysql.cj.result.Row.getValue.

Implementation of getValue() based on the underlying byte array.

public boolean
public void
setBytes(int
index of the column (starting at 0) to set to.
index
,
byte[]
the (raw) value to set
value
)

Overrides default com.mysql.cj.result.Row.setBytes.

Sets the given byte array as a raw column value (only works currently with ByteArrayRow).

Inherited from com.mysql.cj.protocol.result.AbstractResultsetRow:
getValueFromBytessetMetadatawasNull

Field Detail

internalRowDataback to summary
pack-priv byte[][] internalRowData

Constructor Detail

ByteArrayRowback to summary
public ByteArrayRow(byte[][] internalRowData, ExceptionInterceptor exceptionInterceptor, ValueDecoder valueDecoder)
ByteArrayRowback to summary
public ByteArrayRow(byte[][] internalRowData, ExceptionInterceptor exceptionInterceptor)

Method Detail

getBytesback to summary
public byte[] getBytes(int index)

Overrides default com.mysql.cj.result.Row.getBytes.

Doc from com.mysql.cj.result.Row.getBytes.

Returns the value at the given column as a byte array. The bytes represent the raw values returned by the server.

Parameters
index:int

index of column (starting at 0) to return from.

Returns:byte[]

the value for the given column; if the value is SQL NULL, the value returned is null

Annotations
@Override
getNullback to summary
public boolean getNull(int columnIndex)

Implements com.mysql.cj.result.Row.getNull.

Doc from com.mysql.cj.result.Row.getNull.

Check whether a column is NULL and update the 'wasNull' status.

Parameters
columnIndex:int

of the column value (starting at 0) to check.

Returns:boolean

true if the column value is NULL, false if not.

Annotations
@Override
getValueback to summary
public <T> T getValue(int columnIndex, ValueFactory<T> vf)

Implements com.mysql.cj.result.Row.getValue.

Implementation of getValue() based on the underlying byte array. Delegate to superclass for decoding.

Parameters
<T>

Doc from com.mysql.cj.result.Row.getValue. type to decode to

columnIndex:int

Doc from com.mysql.cj.result.Row.getValue.

index of column to retrieve value from (0-indexed, not JDBC 1-indexed)

vf:ValueFactory<T>

Doc from com.mysql.cj.result.Row.getValue.

value factory used to create the return value after decoding

Returns:T

Doc from com.mysql.cj.result.Row.getValue.

The return value from the value factory

Annotations
@Override
isBinaryEncodedback to summary
public boolean isBinaryEncoded()

Overrides default com.mysql.cj.protocol.ResultsetRow.isBinaryEncoded.

Annotations
@Override
setBytesback to summary
public void setBytes(int index, byte[] value)

Overrides default com.mysql.cj.result.Row.setBytes.

Doc from com.mysql.cj.result.Row.setBytes.

Sets the given byte array as a raw column value (only works currently with ByteArrayRow).

Parameters
index:int

index of the column (starting at 0) to set to.

value:byte[]

the (raw) value to set

Annotations
@Override