Class SpecialValueDecimal

    • Method Detail

      • getDecimalValue

        public Optional<BigDecimal> getDecimalValue()
        Returns:
        the plain decimal value if available
      • toDouble

        public double toDouble()
        Returns:
        value converted into double including special values
      • toString

        public String toString()
        Converts a value from its logical format (BigDecimal/special) to its string representation
        Overrides:
        toString in class Object
        Parameters:
        struct - the strut to put data in
        Returns:
        the encoded value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • builder

        public static org.apache.kafka.connect.data.SchemaBuilder builder​(JdbcValueConverters.DecimalMode mode,
                                                                          int precision,
                                                                          int scale)
        Returns a SchemaBuilder for a decimal number depending on JdbcValueConverters.DecimalMode. You can use the resulting schema builder to set additional schema settings such as required/optional, default value, and documentation.
        Parameters:
        mode - the mode in which the number should be encoded
        precision - the precision of the decimal
        scale - scale of the decimal
        Returns:
        the schema builder