Package org.mariadb.jdbc.codec.list
Class LocalDateTimeCodec
java.lang.Object
org.mariadb.jdbc.codec.list.LocalDateTimeCodec
- All Implemented Interfaces:
Codec<LocalDateTime>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LocalDateTimeCodec
static final DateTimeFormatter
static final DateTimeFormatter
static final DateTimeFormatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecode
(ColumnDefinitionPacket column, Class<?> type) boolean
decodeBinary
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) decodeText
(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) void
encodeBinary
(PacketWriter encoder, Object value, Calendar cal, Long maxLength) void
encodeText
(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) int
static int[]
parseTimestamp
(String raw) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mariadb.jdbc.plugin.Codec
canEncodeLongData, encodeData, encodeLongData
-
Field Details
-
INSTANCE
-
TIMESTAMP_FORMAT
-
TIMESTAMP_FORMAT_NO_FRACTIONAL
-
MARIADB_LOCAL_DATE_TIME
-
COMPATIBLE_TYPES
-
-
Constructor Details
-
LocalDateTimeCodec
public LocalDateTimeCodec()
-
-
Method Details
-
parseTimestamp
- Throws:
DateTimeException
-
className
- Specified by:
className
in interfaceCodec<LocalDateTime>
-
canDecode
- Specified by:
canDecode
in interfaceCodec<LocalDateTime>
-
canEncode
- Specified by:
canEncode
in interfaceCodec<LocalDateTime>
-
decodeText
public LocalDateTime decodeText(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeText
in interfaceCodec<LocalDateTime>
- Throws:
SQLDataException
-
decodeBinary
public LocalDateTime decodeBinary(ReadableByteBuf buf, int length, ColumnDefinitionPacket column, Calendar cal) throws SQLDataException - Specified by:
decodeBinary
in interfaceCodec<LocalDateTime>
- Throws:
SQLDataException
-
encodeText
public void encodeText(PacketWriter encoder, Context context, Object value, Calendar cal, Long maxLen) throws IOException - Specified by:
encodeText
in interfaceCodec<LocalDateTime>
- Throws:
IOException
-
encodeBinary
public void encodeBinary(PacketWriter encoder, Object value, Calendar cal, Long maxLength) throws IOException - Specified by:
encodeBinary
in interfaceCodec<LocalDateTime>
- Throws:
IOException
-
getBinaryEncodeType
public int getBinaryEncodeType()- Specified by:
getBinaryEncodeType
in interfaceCodec<LocalDateTime>
-