Class CustomDateTimeFormatter
- java.lang.Object
-
- io.trino.plugin.kafka.encoder.json.format.CustomDateTimeFormatter
-
- All Implemented Interfaces:
JsonDateTimeFormatter
public class CustomDateTimeFormatter extends Object implements JsonDateTimeFormatter
-
-
Constructor Summary
Constructors Constructor Description CustomDateTimeFormatter(Optional<String> pattern)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringformatDate(SqlDate value)StringformatTime(SqlTime value, int precision)StringformatTimestamp(SqlTimestamp value)StringformatTimestampWithZone(SqlTimestampWithTimeZone value)StringformatTimeWithZone(SqlTimeWithTimeZone value)static booleanisSupportedType(Type type)
-
-
-
Method Detail
-
isSupportedType
public static boolean isSupportedType(Type type)
-
formatDate
public String formatDate(SqlDate value)
- Specified by:
formatDatein interfaceJsonDateTimeFormatter
-
formatTime
public String formatTime(SqlTime value, int precision)
- Specified by:
formatTimein interfaceJsonDateTimeFormatter
-
formatTimeWithZone
public String formatTimeWithZone(SqlTimeWithTimeZone value)
- Specified by:
formatTimeWithZonein interfaceJsonDateTimeFormatter
-
formatTimestamp
public String formatTimestamp(SqlTimestamp value)
- Specified by:
formatTimestampin interfaceJsonDateTimeFormatter
-
formatTimestampWithZone
public String formatTimestampWithZone(SqlTimestampWithTimeZone value)
- Specified by:
formatTimestampWithZonein interfaceJsonDateTimeFormatter
-
-