Class JdbcTypeMapper.Context

java.lang.Object
com.illumon.iris.utils.JdbcTypeMapper.Context
Enclosing class:
JdbcTypeMapper

public static class JdbcTypeMapper.Context
extends Object
A catch-all bucket for settings used when converting Deephaven column values to and from JDBC values. Storing per-import and per-session information here instead of in the mappers allows the mappers to remain static singletons.
  • Method Details

    • of

      public static JdbcTypeMapper.Context of​(TimeZone sourceTimeZone, String arrayDelimiter, boolean strict)
      Create a new context with the given settings.
      Parameters:
      sourceTimeZone - necessary when dealing with many date/time related operations.
      arrayDelimiter - necessary when encoding/decoding arrays as strings
      strict - indicates how forgiving to be with malformed/unexpected input data
    • of

      public static JdbcTypeMapper.Context of​(Calendar calendar)
      Create a new context with the given Calendar. Array delimiter will default to a comma, and strict true.
      Parameters:
      calendar - necessary when dealing with many date/time related operations.
    • getSourceCalendar

      public Calendar getSourceCalendar()
      Get the calendar to use when interpreting local date/time values.
      Returns:
      the calendar
    • getArrayDelimiter

      public String getArrayDelimiter()
      Get the array delimiter to use when encoding/decoding arrays as String values.*
      Returns:
      the delimiter
    • isStrict

      public boolean isStrict()
      Get the strict setting.
      Returns:
      if conversions should be strict