Class MariaDbValueConverters
java.lang.Object
io.debezium.jdbc.JdbcValueConverters
io.debezium.connector.binlog.jdbc.BinlogValueConverters
io.debezium.connector.mariadb.jdbc.MariaDbValueConverters
- All Implemented Interfaces:
io.debezium.relational.ValueConverterProvider
MariaDB specific converter handlers for JDBC values.
This class uses UTC for the default time zone when converting values without timezone details to values that
require timezones. This is because MariaDB
TIMESTAMP values are always stored in UTC, unlike types
like DATETIME, and aare replicated as such. Meanwhile, the Binlog Client will deserialize these as
Timestamp which have no timezone; therefore, are presumed to be UTC.
If a column is Types.TIMESTAMP_WITH_TIMEZONE, the converters will need to convert the value
from a Timestamp to an OffsetDateTime using the default time zone, which
is always UTC.- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.jdbc.JdbcValueConverters
io.debezium.jdbc.JdbcValueConverters.BigIntUnsignedMode, io.debezium.jdbc.JdbcValueConverters.DecimalMode -
Field Summary
Fields inherited from class io.debezium.jdbc.JdbcValueConverters
adaptiveTimeMicrosecondsPrecisionMode, adaptiveTimePrecisionMode, adjuster, bigIntUnsignedMode, binaryMode, decimalMode, defaultOffset, fallbackTimestampWithTimeZone, logger -
Constructor Summary
ConstructorsConstructorDescriptionMariaDbValueConverters(io.debezium.jdbc.JdbcValueConverters.DecimalMode decimalMode, io.debezium.jdbc.TemporalPrecisionMode temporalPrecisionMode, io.debezium.jdbc.JdbcValueConverters.BigIntUnsignedMode bigIntUnsignedMode, io.debezium.config.CommonConnectorConfig.BinaryHandlingMode binaryHandlingMode, TemporalAdjuster adjuster, io.debezium.config.CommonConnectorConfig.EventConvertingFailureHandlingMode eventConvertingFailureHandlingMode) Create a new instance of the value converters that always uses UTC for the default time zone when converting values without timezone information to values that require timezones. -
Method Summary
Modifier and TypeMethodDescriptionextractEnumAndSetOptions(io.debezium.relational.Column column) protected StringgetJavaEncodingForCharSet(String charSetName) Methods inherited from class io.debezium.connector.binlog.jdbc.BinlogValueConverters
adjustTemporal, byteOrderOfBitType, charsetFor, containsZeroValuesInDatePart, convertBigInt, convertDurationToMicroseconds, convertEnumToString, converter, convertFloat, convertGeometry, convertInteger, convertJson, convertPoint, convertSetToString, convertSetValue, convertSmallInt, convertString, convertTimestampToLocalDateTime, convertUnsignedBigint, convertUnsignedInt, convertUnsignedMediumint, convertUnsignedSmallint, convertUnsignedTinyint, convertYearToInt, extractEnumAndSetOptionsAsString, handleUnknownData, isGeometryCollection, matches, normalizeBinaryData, schemaBuilder, stringToDuration, stringToLocalDateMethods inherited from class io.debezium.jdbc.JdbcValueConverters
convertBinary, convertBinaryToBase64, convertBinaryToBase64UrlSafe, convertBinaryToBytes, convertBinaryToHex, convertBit, convertBits, convertBits, convertBoolean, convertDateToEpochDays, convertDateToEpochDaysAsDate, convertDecimal, convertDouble, convertNumeric, convertReal, convertRowId, convertString, convertTime, convertTimestampToEpochMicros, convertTimestampToEpochMillis, convertTimestampToEpochMillisAsDate, convertTimestampToEpochNanos, convertTimestampWithZone, convertTimeToMicrosPastMidnight, convertTimeToMillisPastMidnight, convertTimeToMillisPastMidnightAsDate, convertTimeToNanosPastMidnight, convertTimeWithZone, convertTinyInt, convertValue, getTimePrecision, padLittleEndian, toBigDecimal, toByteBuffer, unexpectedBinary, withScaleAdjustedIfNeeded
-
Constructor Details
-
MariaDbValueConverters
public MariaDbValueConverters(io.debezium.jdbc.JdbcValueConverters.DecimalMode decimalMode, io.debezium.jdbc.TemporalPrecisionMode temporalPrecisionMode, io.debezium.jdbc.JdbcValueConverters.BigIntUnsignedMode bigIntUnsignedMode, io.debezium.config.CommonConnectorConfig.BinaryHandlingMode binaryHandlingMode, TemporalAdjuster adjuster, io.debezium.config.CommonConnectorConfig.EventConvertingFailureHandlingMode eventConvertingFailureHandlingMode) Create a new instance of the value converters that always uses UTC for the default time zone when converting values without timezone information to values that require timezones.- Parameters:
decimalMode- howDECIMALandNUMERICvalues are treated; can be null ifJdbcValueConverters.DecimalMode.PRECISEis usedtemporalPrecisionMode- temporal precision modebigIntUnsignedMode- howBIGINT UNSIGNEDvalues are treated; may be null ifJdbcValueConverters.BigIntUnsignedMode.PRECISEis used.binaryHandlingMode- how binary columns should be treatedadjuster- a temporal adjuster to make a database specific time before conversioneventConvertingFailureHandlingMode- how to handle conversion failures
-
-
Method Details
-
extractEnumAndSetOptions
- Specified by:
extractEnumAndSetOptionsin classBinlogValueConverters
-
getJavaEncodingForCharSet
- Specified by:
getJavaEncodingForCharSetin classBinlogValueConverters
-