Class IntervalType

java.lang.Object
io.debezium.connector.jdbc.type.AbstractType
io.debezium.connector.jdbc.dialect.postgres.IntervalType
All Implemented Interfaces:
Type

class IntervalType extends AbstractType
An implementation of Type for MicroDuration types.
Author:
Chris Cranford
  • Field Details

  • Constructor Details

    • IntervalType

      IntervalType()
  • 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.

    • getQueryBinding

      public String getQueryBinding(ColumnDescriptor column, org.apache.kafka.connect.data.Schema schema)
      Description copied from interface: Type
      Return the SQL string to be used in DML statements for binding this type to SQL.
      Specified by:
      getQueryBinding in interface Type
      Overrides:
      getQueryBinding in class AbstractType
      Parameters:
      column - column descriptor in the table relational model, never null
      schema - field schema, never null
      Returns:
      query parameter argument binding SQL fragment
    • getTypeName

      public String getTypeName(DatabaseDialect dialect, org.apache.kafka.connect.data.Schema schema, boolean key)
      Description copied from interface: Type
      Return the SQL type name for this type.
      Parameters:
      dialect - dialect instance, never null
      schema - field schema, never null
      key - whether the type resolution is for a key field
      Returns:
      the resolved type to be used in DDL statements
    • 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
    • bind

      public void bind(org.hibernate.query.Query<?> query, int index, org.apache.kafka.connect.data.Schema schema, Object value)
      Description copied from interface: Type
      Binds the value to the query.
      Specified by:
      bind in interface Type
      Overrides:
      bind in class AbstractType
      Parameters:
      query - hibernate query, is never null
      index - parameter index to bind
      schema - field schema, never null
      value - value to be bound, may be null