public class LocalDateTimeCodec extends Object implements Codec<LocalDateTime>
| Modifier and Type | Field and Description |
|---|---|
static LocalDateTimeCodec |
INSTANCE |
static DateTimeFormatter |
SINGLESTORE_LOCAL_DATE_TIME |
static DateTimeFormatter |
TIMESTAMP_FORMAT |
static DateTimeFormatter |
TIMESTAMP_FORMAT_NO_FRACTIONAL |
| Constructor and Description |
|---|
LocalDateTimeCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecode(com.singlestore.jdbc.client.Column column,
Class<?> type) |
boolean |
canEncode(Object value) |
String |
className() |
LocalDateTime |
decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf,
int length,
com.singlestore.jdbc.client.Column column,
Calendar cal) |
LocalDateTime |
decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf,
int length,
com.singlestore.jdbc.client.Column column,
Calendar cal) |
void |
encodeBinary(Writer encoder,
Object value,
Calendar cal,
Long maxLength) |
void |
encodeText(Writer encoder,
com.singlestore.jdbc.client.Context context,
Object value,
Calendar cal,
Long maxLen) |
int |
getBinaryEncodeType() |
static int[] |
parseTimestamp(String raw) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanEncodeLongData, encodeBinaryAsString, encodeData, encodeLongDatapublic static final LocalDateTimeCodec INSTANCE
public static final DateTimeFormatter TIMESTAMP_FORMAT
public static final DateTimeFormatter TIMESTAMP_FORMAT_NO_FRACTIONAL
public static final DateTimeFormatter SINGLESTORE_LOCAL_DATE_TIME
public static int[] parseTimestamp(String raw) throws DateTimeException
DateTimeExceptionpublic String className()
className in interface Codec<LocalDateTime>public boolean canDecode(com.singlestore.jdbc.client.Column column,
Class<?> type)
canDecode in interface Codec<LocalDateTime>public boolean canEncode(Object value)
canEncode in interface Codec<LocalDateTime>public LocalDateTime decodeText(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, com.singlestore.jdbc.client.Column column, Calendar cal) throws SQLDataException
decodeText in interface Codec<LocalDateTime>SQLDataExceptionpublic LocalDateTime decodeBinary(com.singlestore.jdbc.client.ReadableByteBuf buf, int length, com.singlestore.jdbc.client.Column column, Calendar cal) throws SQLDataException
decodeBinary in interface Codec<LocalDateTime>SQLDataExceptionpublic void encodeText(Writer encoder, com.singlestore.jdbc.client.Context context, Object value, Calendar cal, Long maxLen) throws IOException
encodeText in interface Codec<LocalDateTime>IOExceptionpublic void encodeBinary(Writer encoder, Object value, Calendar cal, Long maxLength) throws IOException
encodeBinary in interface Codec<LocalDateTime>IOExceptionpublic int getBinaryEncodeType()
getBinaryEncodeType in interface Codec<LocalDateTime>Copyright © 2023 SingleStore. All rights reserved.