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

public Class TextBufferRow

extends AbstractBufferRow
Class Inheritance
Imports
com.mysql.cj.exceptions.ExceptionInterceptor, com.mysql.cj.protocol.ColumnDefinition, .ValueDecoder, com.mysql.cj.protocol.a.NativeConstants.IntegerDataType, .NativeConstants.StringSelfDataType, .NativePacketPayload, com.mysql.cj.result.Row, .ValueFactory

A ResultSetRow implementation that holds one row packet (which is re-used by the driver, and thus saves memory allocations), and tries when possible to avoid allocations to break out the results as individual byte[]s. (this isn't possible when doing things like reading floating point values).

Field Summary

Inherited from com.mysql.cj.protocol.a.result.AbstractBufferRow:
homePositionlastRequestedIndexlastRequestedPosrowFromServer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected int
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 Buffer object.

public Row

Constructor Detail

TextBufferRowback to summary
public TextBufferRow(NativePacketPayload buf, ColumnDefinition cd, ExceptionInterceptor exceptionInterceptor, ValueDecoder valueDecoder)

Method Detail

findAndSeekToOffsetback to summary
protected int findAndSeekToOffset(int index)

Implements abstract com.mysql.cj.protocol.a.result.AbstractBufferRow.findAndSeekToOffset.

Annotations
@Override
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 Buffer object. 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
setMetadataback to summary
public Row setMetadata(ColumnDefinition f)

Overrides com.mysql.cj.protocol.result.AbstractResultsetRow.setMetadata.

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

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

Set metadata to enable getValue functionality.

Parameters
f:ColumnDefinition

ColumnDefinition

Returns:Row

Row

Annotations
@Override