类 TextBufferRow
- java.lang.Object
-
- com.mysql.cj.protocol.result.AbstractResultsetRow
-
- com.mysql.cj.protocol.a.result.AbstractBufferRow
-
- com.mysql.cj.protocol.a.result.TextBufferRow
-
- 所有已实现的接口:
ProtocolEntity,ResultsetRow,Row
public class TextBufferRow extends AbstractBufferRow
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).
-
-
字段概要
-
从类继承的字段 com.mysql.cj.protocol.a.result.AbstractBufferRow
homePosition, lastRequestedIndex, lastRequestedPos, rowFromServer
-
从类继承的字段 com.mysql.cj.protocol.result.AbstractResultsetRow
exceptionInterceptor, metadata, valueDecoder, wasNull
-
-
构造器概要
构造器 构造器 说明 TextBufferRow(NativePacketPayload buf, ColumnDefinition cd, ExceptionInterceptor exceptionInterceptor, ValueDecoder valueDecoder)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected intfindAndSeekToOffset(int index)byte[]getBytes(int index)Returns the value at the given column as a byte array.booleangetNull(int columnIndex)Check whether a column is NULL and update the 'wasNull' status.<T> TgetValue(int columnIndex, ValueFactory<T> vf)Implementation of getValue() based on the underlying Buffer object.RowsetMetadata(ColumnDefinition f)Set metadata to enable getValue functionality.-
从类继承的方法 com.mysql.cj.protocol.result.AbstractResultsetRow
getValueFromBytes, wasNull
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.protocol.ResultsetRow
isBinaryEncoded
-
-
-
-
构造器详细资料
-
TextBufferRow
public TextBufferRow(NativePacketPayload buf, ColumnDefinition cd, ExceptionInterceptor exceptionInterceptor, ValueDecoder valueDecoder)
-
-
方法详细资料
-
findAndSeekToOffset
protected int findAndSeekToOffset(int index)
-
getBytes
public byte[] getBytes(int index)
从接口复制的说明:RowReturns the value at the given column as a byte array. The bytes represent the raw values returned by the server.- 参数:
index- index of column (starting at 0) to return from.- 返回:
- the value for the given column; if the value is SQL
NULL, the value returned isnull
-
getNull
public boolean getNull(int columnIndex)
从接口复制的说明:RowCheck whether a column is NULL and update the 'wasNull' status.- 参数:
columnIndex- of the column value (starting at 0) to check.- 返回:
- true if the column value is NULL, false if not.
-
setMetadata
public Row setMetadata(ColumnDefinition f)
从接口复制的说明:RowSet metadata to enable getValue functionality.- 指定者:
setMetadata在接口中Row- 覆盖:
setMetadata在类中AbstractResultsetRow- 参数:
f-ColumnDefinition- 返回:
Row
-
getValue
public <T> T getValue(int columnIndex, ValueFactory<T> vf)Implementation of getValue() based on the underlying Buffer object. Delegate to superclass for decoding.- 类型参数:
T- type to decode to- 参数:
columnIndex- index of column to retrieve value from (0-indexed, not JDBC 1-indexed)vf- value factory used to create the return value after decoding- 返回:
- The return value from the value factory
-
-