Package io.debezium.connector.mysql
Class MySqlDefaultValueConverter
- java.lang.Object
-
- io.debezium.connector.mysql.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 Summary
Constructors Constructor Description MySqlDefaultValueConverter(MySqlValueConverters converters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectconvert(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.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.
-
-
-
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:
parseDefaultValuein interfaceio.debezium.relational.DefaultValueConverter- Parameters:
column- the column definition describing thedatavalue; never nulldefaultValueExpression- 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 definitionvalue- string formatted default value- Returns:
- value converted to a Java type
-
-