public class BinaryRowDecoder extends Object implements RowDecoder
| Constructor and Description |
|---|
BinaryRowDecoder() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
decode(Codec<T> codec,
Calendar cal,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength,
com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex)
Binary decode data according to data type.
|
boolean |
decodeBoolean(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to boolean.
|
byte |
decodeByte(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to byte.
|
Date |
decodeDate(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength,
Calendar cal)
Decode data according to Date.
|
double |
decodeDouble(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to double.
|
float |
decodeFloat(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to float.
|
int |
decodeInt(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to int.
|
long |
decodeLong(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to long.
|
short |
decodeShort(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to short.
|
String |
decodeString(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to String.
|
Time |
decodeTime(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength,
Calendar cal)
Decode data according to Time.
|
Timestamp |
decodeTimestamp(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength,
Calendar cal)
Decode data according to Timestamp.
|
Object |
defaultDecode(Configuration conf,
com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
Decode data according to data type.
|
int |
setPosition(int newIndex,
MutableInt fieldIndex,
int maxIndex,
StandardReadableByteBuf rowBuf,
byte[] nullBitmap,
com.singlestore.jdbc.client.ColumnDecoder[] metadataList)
Set length and pos indicator to asked index.
|
boolean |
wasNull(byte[] nullBitmap,
MutableInt fieldIndex,
MutableInt fieldLength)
Indicate if last decoded value was null
|
public <T> T decode(Codec<T> codec, Calendar cal, StandardReadableByteBuf rowBuf, MutableInt fieldLength, com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex) throws SQLException
decode in interface RowDecoderT - Codec default return typecodec - current codeccal - calendarrowBuf - row bufferfieldLength - field lengthmetadataList - metadatasfieldIndex - field indexSQLException - if any decoding error occurspublic Object defaultDecode(Configuration conf, com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex, StandardReadableByteBuf rowBuf, MutableInt fieldLength) throws SQLException
RowDecoderdefaultDecode in interface RowDecoderconf - configurationmetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if any decoding error occurspublic String decodeString(com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex, StandardReadableByteBuf rowBuf, MutableInt fieldLength) throws SQLException
RowDecoderdecodeString in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to String valuepublic byte decodeByte(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeByte in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to byte valuepublic boolean decodeBoolean(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeBoolean in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to boolean valuepublic Date decodeDate(com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex, StandardReadableByteBuf rowBuf, MutableInt fieldLength, Calendar cal) throws SQLException
RowDecoderdecodeDate in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthcal - calendarSQLException - if data type cannot be decoded to Date valuepublic Time decodeTime(com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex, StandardReadableByteBuf rowBuf, MutableInt fieldLength, Calendar cal) throws SQLException
RowDecoderdecodeTime in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthcal - calendarSQLException - if data type cannot be decoded to Time valuepublic Timestamp decodeTimestamp(com.singlestore.jdbc.client.ColumnDecoder[] metadataList, MutableInt fieldIndex, StandardReadableByteBuf rowBuf, MutableInt fieldLength, Calendar cal) throws SQLException
RowDecoderdecodeTimestamp in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthcal - calendarSQLException - if data type cannot be decoded to Timestamp valuepublic short decodeShort(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeShort in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to short valuepublic int decodeInt(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeInt in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to int valuepublic long decodeLong(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeLong in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to long valuepublic float decodeFloat(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeFloat in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to float valuepublic double decodeDouble(com.singlestore.jdbc.client.ColumnDecoder[] metadataList,
MutableInt fieldIndex,
StandardReadableByteBuf rowBuf,
MutableInt fieldLength)
throws SQLException
RowDecoderdecodeDouble in interface RowDecodermetadataList - metadata listfieldIndex - field indexrowBuf - row bufferfieldLength - field lengthSQLException - if data type cannot be decoded to double valuepublic boolean wasNull(byte[] nullBitmap,
MutableInt fieldIndex,
MutableInt fieldLength)
RowDecoderwasNull in interface RowDecodernullBitmap - null bitmapfieldIndex - field indexfieldLength - field lengthpublic int setPosition(int newIndex,
MutableInt fieldIndex,
int maxIndex,
StandardReadableByteBuf rowBuf,
byte[] nullBitmap,
com.singlestore.jdbc.client.ColumnDecoder[] metadataList)
setPosition in interface RowDecodernewIndex - index (0 is first).fieldIndex - current field indexmaxIndex - maximum indexrowBuf - row buffernullBitmap - null bitmapmetadataList - metadata listCopyright © 2025 SingleStore. All rights reserved.