接口 Row
-
- 所有超级接口:
ProtocolEntity
- 所有已知子接口:
ResultsetRow
- 所有已知实现类:
AbstractBufferRow,AbstractResultsetRow,BinaryBufferRow,ByteArrayRow,TextBufferRow,XProtocolRow
public interface Row extends ProtocolEntity
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default byte[]getBytes(int columnIndex)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)Retrieve a value for the given column.default voidsetBytes(int columnIndex, byte[] value)Sets the given byte array as a raw column value (only works currently with ByteArrayRow).default RowsetMetadata(ColumnDefinition columnDefinition)Set metadata to enable getValue functionality.booleanwasNull()Was the last value retrieved a NULL value?
-
-
-
方法详细资料
-
getValue
<T> T getValue(int columnIndex, ValueFactory<T> vf)Retrieve a value for the given column. This is the main facility to access values from the Row involvingValueDecoderandValueFactorychain. Metadata must be set via Row constructor orsetMetadata(ColumnDefinition)call before calling this method to allow correct columnIndex boundaries check and data type recognition.- 类型参数:
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
-
setMetadata
default Row setMetadata(ColumnDefinition columnDefinition)
Set metadata to enable getValue functionality.- 参数:
columnDefinition-ColumnDefinition- 返回:
Row
-
getBytes
default byte[] getBytes(int columnIndex)
Returns the value at the given column as a byte array. The bytes represent the raw values returned by the server.- 参数:
columnIndex- 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
-
setBytes
default void setBytes(int columnIndex, byte[] value)Sets the given byte array as a raw column value (only works currently with ByteArrayRow).- 参数:
columnIndex- index of the column (starting at 0) to set to.value- the (raw) value to set
-
getNull
boolean getNull(int columnIndex)
Check 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.
-
wasNull
boolean wasNull()
Was the last value retrieved a NULL value?- 返回:
- true if the last retrieved value was NULL.
-
-