Class FieldNameUnderscoreReplacementFunction

java.lang.Object
io.debezium.schema.FieldNameUnderscoreReplacementFunction
All Implemented Interfaces:
io.debezium.spi.common.ReplacementFunction

public class FieldNameUnderscoreReplacementFunction extends Object implements io.debezium.spi.common.ReplacementFunction
A field name underscore replacement implementation of ReplacementFunction
Author:
Harvey Yue
  • Field Summary

    Fields inherited from interface io.debezium.spi.common.ReplacementFunction

    REPLACEMENT_CHAR, UNDERSCORE_REPLACEMENT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Sanitize column names that are illegal in Avro Must conform to https://avro.apache.org/docs/1.7.7/spec.html#Names Legal characters are [a-zA-Z_] for the first character and [a-zA-Z0-9_] thereafter.
    replace(char invalid)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.debezium.spi.common.ReplacementFunction

    isValidFirstCharacter
  • Constructor Details

    • FieldNameUnderscoreReplacementFunction

      public FieldNameUnderscoreReplacementFunction()
  • Method Details

    • replace

      public String replace(char invalid)
      Specified by:
      replace in interface io.debezium.spi.common.ReplacementFunction
    • isValidNonFirstCharacter

      public boolean isValidNonFirstCharacter(char c)
      Sanitize column names that are illegal in Avro Must conform to https://avro.apache.org/docs/1.7.7/spec.html#Names Legal characters are [a-zA-Z_] for the first character and [a-zA-Z0-9_] thereafter.
      Specified by:
      isValidNonFirstCharacter in interface io.debezium.spi.common.ReplacementFunction