Class HstoreConverter

java.lang.Object
io.debezium.connector.jdbc.dialect.postgres.HstoreConverter

public class HstoreConverter extends Object
Utility helper class for HSTORE column data types.
Author:
Chris Cranford
  • Field Details

    • MAPPER

      private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
  • Constructor Details

    • HstoreConverter

      public HstoreConverter()
  • Method Details

    • jsonToString

      public static String jsonToString(String value)
      Converts a JSON-based string to a HStORE string.
      Parameters:
      value - JSON-based string
      Returns:
      the HSTORE column type value represented as a string
    • mapToString

      public static String mapToString(Map<String,String> hstoreMap)
      Converts a Java-based map to a HSTORE string representation.
      Parameters:
      hstoreMap - map of key/value tuples, should not be null.
      Returns:
      the HSTORE column type value represented as a string
    • formatHstoreEntry

      private static String formatHstoreEntry(Map.Entry<String,String> entry)