Class AbstractConnectMapType
java.lang.Object
io.debezium.connector.jdbc.type.AbstractType
io.debezium.connector.jdbc.type.connect.AbstractConnectSchemaType
io.debezium.connector.jdbc.type.connect.AbstractConnectMapType
- All Implemented Interfaces:
Type
- Direct Known Subclasses:
ConnectMapToConnectStringType,MapToHstoreType,MapToJsonType
An implementation of
Type for MAP schema types. This is created an abstract
implementation as its expected that each dialect will create its own implementation as the
logic to handle map-based schema types differs by dialect.- Author:
- Chris Cranford
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Resolve the default value clause value.String[]Returns the names that this type will be mapped as.protected StringmapToJsonString(Object value) Methods inherited from class io.debezium.connector.jdbc.type.AbstractType
bind, configure, getDialect, getQueryBinding, getSchemaParameter, getSourceColumnPrecision, getSourceColumnSize, getSourceColumnType, throwUnexpectedValue, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.debezium.connector.jdbc.type.Type
getTypeName
-
Field Details
-
MAPPER
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
-
-
Constructor Details
-
AbstractConnectMapType
public AbstractConnectMapType()
-
-
Method Details
-
getRegistrationKeys
Description copied from interface:TypeReturns the names that this type will be mapped as.For example, when creating a custom mapping for
io.debezium.data.Bits, a type could be registered using theLOGICAL_NAMEof the schema if the type is to be used when a schema name is identified; otherwise it could be registered as the raw column type when column type propagation is enabled. -
getDefaultValueBinding
public String getDefaultValueBinding(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, Object value) Description copied from interface:TypeResolve the default value clause value.- Specified by:
getDefaultValueBindingin interfaceType- Overrides:
getDefaultValueBindingin classAbstractType- Parameters:
dialect- dialect instance, nevernullschema- field schema, nevernullvalue- the default value, should not benull- Returns:
- the formatted default value for the SQL statement as a string
-
mapToJsonString
-