Class AbstractConnectMapType

All Implemented Interfaces:
Type
Direct Known Subclasses:
ConnectMapToConnectStringType, MapToHstoreType, MapToJsonType

public abstract class AbstractConnectMapType extends AbstractConnectSchemaType
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 Details

    • MAPPER

      private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
  • Constructor Details

    • AbstractConnectMapType

      public AbstractConnectMapType()
  • Method Details

    • getRegistrationKeys

      public String[] getRegistrationKeys()
      Description copied from interface: Type
      Returns 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 the LOGICAL_NAME of 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: Type
      Resolve the default value clause value.
      Specified by:
      getDefaultValueBinding in interface Type
      Overrides:
      getDefaultValueBinding in class AbstractType
      Parameters:
      dialect - dialect instance, never null
      schema - field schema, never null
      value - the default value, should not be null
      Returns:
      the formatted default value for the SQL statement as a string
    • mapToJsonString

      protected String mapToJsonString(Object value)