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

@Immutable public class MariaDbValueConverters extends BinlogValueConverters
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
  • 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 - how DECIMAL and NUMERIC values are treated; can be null if JdbcValueConverters.DecimalMode.PRECISE is used
      temporalPrecisionMode - temporal precision mode
      bigIntUnsignedMode - how BIGINT UNSIGNED values are treated; may be null if JdbcValueConverters.BigIntUnsignedMode.PRECISE is used.
      binaryHandlingMode - how binary columns should be treated
      adjuster - a temporal adjuster to make a database specific time before conversion
      eventConvertingFailureHandlingMode - how to handle conversion failures
  • Method Details