Package com.mysql.cj.protocol.result
Class AbstractResultsetRow
java.lang.Object
com.mysql.cj.protocol.result.AbstractResultsetRow
- All Implemented Interfaces:
ProtocolEntity
,ResultsetRow
,Row
- Direct Known Subclasses:
AbstractBufferRow
,ByteArrayRow
public abstract class AbstractResultsetRow extends java.lang.Object implements ResultsetRow
-
Field Summary
Fields Modifier and Type Field Description protected ExceptionInterceptor
exceptionInterceptor
protected ColumnDefinition
metadata
The metadata of the fields of this result set.protected ValueDecoder
valueDecoder
protected boolean
wasNull
Did the previous value retrieval find a NULL? -
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResultsetRow(ExceptionInterceptor exceptionInterceptor)
-
Method Summary
Modifier and Type Method Description protected <T> T
getValueFromBytes(int columnIndex, byte[] bytes, int offset, int length, ValueFactory<T> vf)
Get a value from a byte array.Row
setMetadata(ColumnDefinition f)
Set metadata to enable getValue functionality.boolean
wasNull()
Was the last value retrieved a NULL value?
-
Field Details
-
exceptionInterceptor
-
metadata
The metadata of the fields of this result set. -
valueDecoder
-
wasNull
protected boolean wasNullDid the previous value retrieval find a NULL?
-
-
Constructor Details
-
Method Details
-
getValueFromBytes
protected <T> T getValueFromBytes(int columnIndex, byte[] bytes, int offset, int length, ValueFactory<T> vf)Get a value from a byte array. The byte array is interpreted by theValueDecoder
which uses the value factory create the return value.- Type Parameters:
T
- value type- Parameters:
columnIndex
- The (internal) index of the columnbytes
- byte arrayoffset
- offset into byte arraylength
- length of value in byte arrayvf
- value factory- Returns:
- value
-
setMetadata
Description copied from interface:Row
Set metadata to enable getValue functionality.- Specified by:
setMetadata
in interfaceRow
- Parameters:
f
-ColumnDefinition
- Returns:
Row
-
wasNull
public boolean wasNull()Description copied from interface:Row
Was the last value retrieved a NULL value?
-