All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class YearMonthIntervalType extends DataType implements scala.Product, Serializable

The type represents year-month intervals of the SQL standard. A year-month interval is made up of a contiguous subset of the following fields: - MONTH, months within years [0..11], - YEAR, years in the range [0..178956970].

YearMonthIntervalType represents positive as well as negative year-month intervals.

param: startField The leftmost field which the type comprises of. Valid values: 0 (YEAR), 1 (MONTH). param: endField The rightmost field which the type comprises of. Valid values: 0 (YEAR), 1 (MONTH).

Since:
3.2.0
See Also:
  • Constructor Details

    • YearMonthIntervalType

      public YearMonthIntervalType(byte startField, byte endField)

  • Method Details

    • YEAR

      public static byte YEAR()

    • MONTH

      public static byte MONTH()

    • yearMonthFields

      public static scala.collection.immutable.Seq<Object> yearMonthFields()

    • fieldToString

      public static String fieldToString(byte field)

    • stringToField

      public static scala.collection.immutable.Map<String,Object> stringToField()

    • DEFAULT

    • apply

    • apply

    • canEqual

      public abstract static boolean canEqual(Object that)

    • equals

      public abstract static boolean equals(Object that)

    • productArity

      public abstract static int productArity()

    • productElement

      public abstract static Object productElement(int n)

    • productIterator

      public static scala.collection.Iterator<Object> productIterator()

    • productPrefix

      public static String productPrefix()

    • productElementName

      public static String productElementName(int n)

    • productElementNames

      public static scala.collection.Iterator<String> productElementNames()

    • startField

      public byte startField()

    • endField

      public byte endField()

    • defaultSize

      public int defaultSize()

      Year-month interval values always occupy 4 bytes. The YEAR field is constrained by the upper bound 178956970 to fit to Int.

      Specified by:
      defaultSize in class DataType
      Returns:
      (undocumented)
    • typeName

      Description copied from class: DataType

      Name of the type used in JSON serialization.

      Overrides:
      typeName in class DataType