Class VariableScaleDecimal

java.lang.Object
io.debezium.data.VariableScaleDecimal

public class VariableScaleDecimal extends Object
An arbitrary precision decimal value with variable scale.
Author:
Jiri Pechanec
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final int
     
    static final String
     
    static final org.apache.kafka.connect.data.Struct
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.kafka.connect.data.SchemaBuilder
    Returns a SchemaBuilder for a VariableScaleDecimal.
    static org.apache.kafka.connect.data.Struct
    fromLogical(org.apache.kafka.connect.data.Schema schema, SpecialValueDecimal value)
    Converts a value from its logical format to its encoded format - a struct containing the scale of the number and a binary representation of the number.
    static org.apache.kafka.connect.data.Struct
    fromLogical(org.apache.kafka.connect.data.Schema schema, BigDecimal decimalValue)
    Converts a value from its logical format to its encoded format - a struct containing the scale of the number and a binary representation of the number.
    static org.apache.kafka.connect.data.Schema
    Returns a Schema for an optional VariableScaleDecimal but with all other default Schema settings.
    static org.apache.kafka.connect.data.Schema
    Returns a Schema for a VariableScaleDecimal but with all other default Schema settings.
    toLogical(org.apache.kafka.connect.data.Struct value)
    Decodes the encoded value - see fromLogical(Schema, BigDecimal) for encoding format

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • VariableScaleDecimal

      public VariableScaleDecimal()
  • Method Details

    • builder

      public static org.apache.kafka.connect.data.SchemaBuilder builder()
      Returns a SchemaBuilder for a VariableScaleDecimal. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.
      Returns:
      the schema builder
    • schema

      public static org.apache.kafka.connect.data.Schema schema()
      Returns a Schema for a VariableScaleDecimal but with all other default Schema settings.
      Returns:
      the schema
      See Also:
    • optionalSchema

      public static org.apache.kafka.connect.data.Schema optionalSchema()
      Returns a Schema for an optional VariableScaleDecimal but with all other default Schema settings.
      Returns:
      the schema
      See Also:
    • fromLogical

      public static org.apache.kafka.connect.data.Struct fromLogical(org.apache.kafka.connect.data.Schema schema, SpecialValueDecimal value)
      Converts a value from its logical format to its encoded format - a struct containing the scale of the number and a binary representation of the number.
      Parameters:
      schema - of the encoded value
      decimalValue - the value or the decimal
      Returns:
      the encoded value
    • fromLogical

      public static org.apache.kafka.connect.data.Struct fromLogical(org.apache.kafka.connect.data.Schema schema, BigDecimal decimalValue)
      Converts a value from its logical format to its encoded format - a struct containing the scale of the number and a binary representation of the number.
      Parameters:
      schema - of the encoded value
      decimalValue - the value or the decimal
      Returns:
      the encoded value
    • toLogical

      public static SpecialValueDecimal toLogical(org.apache.kafka.connect.data.Struct value)
      Decodes the encoded value - see fromLogical(Schema, BigDecimal) for encoding format
      Parameters:
      value - the encoded value
      Returns:
      the decoded value