| Constructor and Description |
|---|
DateCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(ColumnDefinitionPacket column,
Class<?> type) |
boolean |
canEncode(Object value) |
String |
className() |
Date |
decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf,
int length,
ColumnDefinitionPacket column,
Calendar cal) |
Date |
decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf,
int length,
ColumnDefinitionPacket column,
Calendar cal) |
void |
encodeBinary(PacketWriter encoder,
Object value,
Calendar providedCal,
Long maxLength) |
void |
encodeText(PacketWriter encoder,
Context context,
Object val,
Calendar providedCal,
Long maxLen) |
int |
getBinaryEncodeType() |
public static final DateCodec INSTANCE
public String className()
className in interface com.singlestore.jdbc.codec.Codec<Date>public boolean canDecode(ColumnDefinitionPacket column, Class<?> type)
canDecode in interface com.singlestore.jdbc.codec.Codec<Date>public boolean canEncode(Object value)
canEncode in interface com.singlestore.jdbc.codec.Codec<Date>public Date decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
decodeText in interface com.singlestore.jdbc.codec.Codec<Date>SQLDataExceptionpublic Date decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException
decodeBinary in interface com.singlestore.jdbc.codec.Codec<Date>SQLDataExceptionpublic void encodeText(PacketWriter encoder, Context context, Object val, Calendar providedCal, Long maxLen) throws IOException
encodeText in interface com.singlestore.jdbc.codec.Codec<Date>IOExceptionpublic void encodeBinary(PacketWriter encoder, Object value, Calendar providedCal, Long maxLength) throws IOException
encodeBinary in interface com.singlestore.jdbc.codec.Codec<Date>IOExceptionpublic int getBinaryEncodeType()
getBinaryEncodeType in interface com.singlestore.jdbc.codec.Codec<Date>Copyright © 2022 SingleStore. All rights reserved.