Class MySqlDefaultValueConverter

  • All Implemented Interfaces:
    io.debezium.relational.DefaultValueConverter

    @Immutable
    public class MySqlDefaultValueConverter
    extends Object
    implements io.debezium.relational.DefaultValueConverter
    Copied from Debezium project(1.9.8.final) to add BIGINT and SMALLINT to TRIM_DATA_TYPES. Remove this until https://issues.redhat.com/browse/DBZ-6824 is fixed in 2.3.3.Final.

    Line 81 & 82: add BIGINT and SMALLINT to TRIM_DATA_TYPES.

    • Constructor Detail

      • MySqlDefaultValueConverter

        public MySqlDefaultValueConverter​(MySqlValueConverters converters)
    • Method Detail

      • parseDefaultValue

        public Optional<Object> parseDefaultValue​(io.debezium.relational.Column column,
                                                  String defaultValueExpression)
        This interface is used by a DDL parser to convert the string default value to a Java type recognized by value converters for a subset of types.
        Specified by:
        parseDefaultValue in interface io.debezium.relational.DefaultValueConverter
        Parameters:
        column - the column definition describing the data value; never null
        defaultValueExpression - the default value literal; may be null
        Returns:
        value converted to a Java type; optional
      • convert

        public Object convert​(io.debezium.relational.Column column,
                              String value)
        Converts a default value from the expected format to a logical object acceptable by the main JDBC converter.
        Parameters:
        column - column definition
        value - string formatted default value
        Returns:
        value converted to a Java type