Interface ValueConverterProvider

All Known Implementing Classes:
JdbcValueConverters

public interface ValueConverterProvider
A provider of ValueConverter functions and the SchemaBuilder used to describe them.
Author:
Randall Hauch
  • Method Summary

    Modifier and Type
    Method
    Description
    converter(Column columnDefinition, org.apache.kafka.connect.data.Field fieldDefn)
    Returns a ValueConverter that can be used to convert the JDBC values corresponding to the given JDBC temporal type into literal values described by the schema.
    org.apache.kafka.connect.data.SchemaBuilder
    schemaBuilder(Column columnDefinition)
    Returns a SchemaBuilder for a Schema describing literal values of the given JDBC type.
  • Method Details

    • schemaBuilder

      org.apache.kafka.connect.data.SchemaBuilder schemaBuilder(Column columnDefinition)
      Returns a SchemaBuilder for a Schema describing literal values of the given JDBC type.
      Parameters:
      columnDefinition - the column definition; never null
      Returns:
      the schema builder; null if the column's type information is unknown
    • converter

      ValueConverter converter(Column columnDefinition, org.apache.kafka.connect.data.Field fieldDefn)
      Returns a ValueConverter that can be used to convert the JDBC values corresponding to the given JDBC temporal type into literal values described by the schema.

      This method is only called when schemaBuilder(Column) returns a non-null SchemaBuilder for the same column definition.

      Parameters:
      columnDefinition - the column definition; never null
      fieldDefn - the definition for the field in a Kafka Connect Schema describing the output of the function; never null
      Returns:
      the value converter; never null