Class Db2ValueConverters

java.lang.Object
io.debezium.jdbc.JdbcValueConverters
io.debezium.connector.db2.Db2ValueConverters
All Implemented Interfaces:
io.debezium.relational.ValueConverterProvider

public class Db2ValueConverters extends io.debezium.jdbc.JdbcValueConverters
Conversion of DB2 specific datatypes.
Author:
Jiri Pechanec, Peter Urbanetz
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.debezium.jdbc.JdbcValueConverters

    io.debezium.jdbc.JdbcValueConverters.BigIntUnsignedMode, io.debezium.jdbc.JdbcValueConverters.DecimalMode
  • Field Summary

    Fields inherited from class io.debezium.jdbc.JdbcValueConverters

    adaptiveTimeMicrosecondsPrecisionMode, adaptiveTimePrecisionMode, bigIntUnsignedMode, binaryMode, decimalMode, logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Db2ValueConverters(io.debezium.jdbc.JdbcValueConverters.DecimalMode decimalMode, io.debezium.jdbc.TemporalPrecisionMode temporalPrecisionMode)
    Create a new instance that always uses UTC for the default time zone when converting values without timezone information to values that require timezones.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.debezium.relational.ValueConverter
    converter(io.debezium.relational.Column column, org.apache.kafka.connect.data.Field fieldDefn)
     
    protected Object
    convertTimestampWithZone(io.debezium.relational.Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data)
     
    protected int
    getTimePrecision(io.debezium.relational.Column column)
    Time precision in DB2 is defined in scale, the default one is 7
    org.apache.kafka.connect.data.SchemaBuilder
    schemaBuilder(io.debezium.relational.Column column)
     

    Methods inherited from class io.debezium.jdbc.JdbcValueConverters

    byteOrderOfBitType, convertBigInt, convertBinary, convertBinaryToBase64, convertBinaryToBase64UrlSafe, convertBinaryToBytes, convertBinaryToHex, convertBit, convertBits, convertBits, convertBoolean, convertDateToEpochDays, convertDateToEpochDaysAsDate, convertDecimal, convertDouble, convertFloat, convertInteger, convertNumeric, convertReal, convertRowId, convertSmallInt, convertString, convertTime, convertTimestampToEpochMicros, convertTimestampToEpochMillis, convertTimestampToEpochMillisAsDate, convertTimestampToEpochNanos, convertTimeToMicrosPastMidnight, convertTimeToMillisPastMidnight, convertTimeToMillisPastMidnightAsDate, convertTimeToNanosPastMidnight, convertTimeWithZone, convertTinyInt, convertValue, handleUnknownData, normalizeBinaryData, padLittleEndian, toBigDecimal, toByteBuffer, unexpectedBinary, withScaleAdjustedIfNeeded

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Db2ValueConverters

      public Db2ValueConverters()
    • Db2ValueConverters

      public Db2ValueConverters(io.debezium.jdbc.JdbcValueConverters.DecimalMode decimalMode, io.debezium.jdbc.TemporalPrecisionMode temporalPrecisionMode)
      Create a new instance that always uses UTC for the default time zone when converting values without timezone information to values that require timezones.

      Parameters:
      decimalMode - how DECIMAL and NUMERIC values should be treated; may be null if JdbcValueConverters.DecimalMode.PRECISE is to be used
      temporalPrecisionMode - date/time value will be represented either as Connect datatypes or Debezium specific datatypes
  • Method Details

    • schemaBuilder

      public org.apache.kafka.connect.data.SchemaBuilder schemaBuilder(io.debezium.relational.Column column)
      Specified by:
      schemaBuilder in interface io.debezium.relational.ValueConverterProvider
      Overrides:
      schemaBuilder in class io.debezium.jdbc.JdbcValueConverters
    • converter

      public io.debezium.relational.ValueConverter converter(io.debezium.relational.Column column, org.apache.kafka.connect.data.Field fieldDefn)
      Specified by:
      converter in interface io.debezium.relational.ValueConverterProvider
      Overrides:
      converter in class io.debezium.jdbc.JdbcValueConverters
    • getTimePrecision

      protected int getTimePrecision(io.debezium.relational.Column column)
      Time precision in DB2 is defined in scale, the default one is 7
      Overrides:
      getTimePrecision in class io.debezium.jdbc.JdbcValueConverters
    • convertTimestampWithZone

      protected Object convertTimestampWithZone(io.debezium.relational.Column column, org.apache.kafka.connect.data.Field fieldDefn, Object data)
      Overrides:
      convertTimestampWithZone in class io.debezium.jdbc.JdbcValueConverters