public class OffsetDateTimeCodec extends Object implements Codec<OffsetDateTime>
| Modifier and Type | Field and Description |
|---|---|
static OffsetDateTimeCodec |
INSTANCE
default instance
|
| Constructor and Description |
|---|
OffsetDateTimeCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(com.singlestore.jdbc.client.ColumnDecoder column,
Class<?> type)
If codec can decode this a server datatype to a java class type
|
boolean |
canEncode(Object value)
Can Codec encode the java object type
|
String |
className()
Codec native type
|
OffsetDateTime |
decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf,
MutableInt length,
com.singlestore.jdbc.client.ColumnDecoder column,
Calendar calParam)
Decode from a mysql packet binary encoded a value to codec java type
|
OffsetDateTime |
decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf,
MutableInt length,
com.singlestore.jdbc.client.ColumnDecoder column,
Calendar calParam)
Decode from a mysql packet text encoded a value to codec java type
|
void |
encodeBinary(Writer encoder,
Object value,
Calendar calParam,
Long length)
Binary encode value to writer
|
void |
encodeText(Writer encoder,
com.singlestore.jdbc.client.Context context,
Object val,
Calendar calParam,
Long length)
Text encode value to writer
|
int |
getApproximateTextProtocolLength(Object value)
Approximate length in bytes.
|
int |
getBinaryEncodeType()
Return server encoding data type
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanEncodeLongData, encodeBinaryAsString, encodeData, encodeLongDatapublic static final OffsetDateTimeCodec INSTANCE
public String className()
CodecclassName in interface Codec<OffsetDateTime>public boolean canDecode(com.singlestore.jdbc.client.ColumnDecoder column,
Class<?> type)
CodeccanDecode in interface Codec<OffsetDateTime>column - server datatypetype - java return classpublic boolean canEncode(Object value)
CodeccanEncode in interface Codec<OffsetDateTime>value - java object typepublic int getApproximateTextProtocolLength(Object value) throws SQLException
CodecgetApproximateTextProtocolLength in interface Codec<OffsetDateTime>value - to calculateSQLExceptionpublic OffsetDateTime decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf, MutableInt length, com.singlestore.jdbc.client.ColumnDecoder column, Calendar calParam) throws SQLDataException
CodecdecodeText in interface Codec<OffsetDateTime>buf - mysql packet bufferlength - encoded value lengthcolumn - server column metadatacalParam - calendarSQLDataException - if unexpected error occurs during decodingpublic OffsetDateTime decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf, MutableInt length, com.singlestore.jdbc.client.ColumnDecoder column, Calendar calParam) throws SQLDataException
CodecdecodeBinary in interface Codec<OffsetDateTime>buf - mysql packet bufferlength - encoded value lengthcolumn - server column metadatacalParam - calendarSQLDataException - if unexpected error occurs during decodingpublic void encodeText(Writer encoder, com.singlestore.jdbc.client.Context context, Object val, Calendar calParam, Long length) throws IOException
CodecencodeText in interface Codec<OffsetDateTime>encoder - writercontext - connection contextval - value to encodecalParam - calendarlength - maximum value lengthIOException - if any socket error occurspublic void encodeBinary(Writer encoder, Object value, Calendar calParam, Long length) throws IOException
CodecencodeBinary in interface Codec<OffsetDateTime>encoder - writervalue - value to encodecalParam - calendarlength - maximum value lengthIOException - if any socket error occurspublic int getBinaryEncodeType()
CodecgetBinaryEncodeType in interface Codec<OffsetDateTime>Copyright © 2025 SingleStore. All rights reserved.