java.lang.Object
org.litebridgedb.convert.converter.SqlTimestampConverter
- All Implemented Interfaces:
Converter<Timestamp>,ConverterFunction<Timestamp>,SqlConverter<Timestamp>
A converter for
Timestamp values.
Handles Types.TIMESTAMP.
-
Constructor Details
-
SqlTimestampConverter
public SqlTimestampConverter()
-
-
Method Details
-
convert
Converts the given value to aTimestamp.Supports various date/time types:
ZonedDateTimeLocalDateTimeLocalDateDateNumber(treated as milliseconds since epoch)String(parsed as date/time)
- Specified by:
convertin interfaceConverterFunction<Timestamp>- Parameters:
value- the value to convert, may benull- Returns:
- the converted
Timestamp, ornull - Throws:
IllegalArgumentException- if the value type is not supported
-
type
Returns the target Java class this converter handles. -
sqlTypes
public int[] sqlTypes()Returns the SQL types associated with this converter.- Specified by:
sqlTypesin interfaceSqlConverter<Timestamp>- Returns:
- an array containing
Types.TIMESTAMP
-