Package org.h2.api

Class H2Type

java.lang.Object
org.h2.api.H2Type
All Implemented Interfaces:
SQLType

public final class H2Type extends Object implements SQLType
Data types of H2.
  • Field Details

    • CHAR

      public static final H2Type CHAR
      The CHARACTER data type.
    • VARCHAR

      public static final H2Type VARCHAR
      The CHARACTER VARYING data type.
    • CLOB

      public static final H2Type CLOB
      The CHARACTER LARGE OBJECT data type.
    • VARCHAR_IGNORECASE

      public static final H2Type VARCHAR_IGNORECASE
      The VARCHAR_IGNORECASE data type.
    • BINARY

      public static final H2Type BINARY
      The BINARY data type.
    • VARBINARY

      public static final H2Type VARBINARY
      The BINARY VARYING data type.
    • BLOB

      public static final H2Type BLOB
      The BINARY LARGE OBJECT data type.
    • BOOLEAN

      public static final H2Type BOOLEAN
      The BOOLEAN data type
    • TINYINT

      public static final H2Type TINYINT
      The TINYINT data type.
    • SMALLINT

      public static final H2Type SMALLINT
      The SMALLINT data type.
    • INTEGER

      public static final H2Type INTEGER
      The INTEGER data type.
    • BIGINT

      public static final H2Type BIGINT
      The BIGINT data type.
    • NUMERIC

      public static final H2Type NUMERIC
      The NUMERIC data type.
    • REAL

      public static final H2Type REAL
      The REAL data type.
    • DOUBLE_PRECISION

      public static final H2Type DOUBLE_PRECISION
      The DOUBLE PRECISION data type.
    • DECFLOAT

      public static final H2Type DECFLOAT
      The DECFLOAT data type.
    • DATE

      public static final H2Type DATE
      The DATE data type.
    • TIME

      public static final H2Type TIME
      The TIME data type.
    • TIME_WITH_TIME_ZONE

      public static final H2Type TIME_WITH_TIME_ZONE
      The TIME WITH TIME ZONE data type.
    • TIMESTAMP

      public static final H2Type TIMESTAMP
      The TIMESTAMP data type.
    • TIMESTAMP_WITH_TIME_ZONE

      public static final H2Type TIMESTAMP_WITH_TIME_ZONE
      The TIMESTAMP WITH TIME ZONE data type.
    • INTERVAL_YEAR

      public static final H2Type INTERVAL_YEAR
      The INTERVAL YEAR data type.
    • INTERVAL_MONTH

      public static final H2Type INTERVAL_MONTH
      The INTERVAL MONTH data type.
    • INTERVAL_DAY

      public static final H2Type INTERVAL_DAY
      The INTERVAL DAY data type.
    • INTERVAL_HOUR

      public static final H2Type INTERVAL_HOUR
      The INTERVAL HOUR data type.
    • INTERVAL_MINUTE

      public static final H2Type INTERVAL_MINUTE
      The INTERVAL MINUTE data type.
    • INTERVAL_SECOND

      public static final H2Type INTERVAL_SECOND
      The INTERVAL SECOND data type.
    • INTERVAL_YEAR_TO_MONTH

      public static final H2Type INTERVAL_YEAR_TO_MONTH
      The INTERVAL YEAR TO MONTH data type.
    • INTERVAL_DAY_TO_HOUR

      public static final H2Type INTERVAL_DAY_TO_HOUR
      The INTERVAL DAY TO HOUR data type.
    • INTERVAL_DAY_TO_MINUTE

      public static final H2Type INTERVAL_DAY_TO_MINUTE
      The INTERVAL DAY TO MINUTE data type.
    • INTERVAL_DAY_TO_SECOND

      public static final H2Type INTERVAL_DAY_TO_SECOND
      The INTERVAL DAY TO SECOND data type.
    • INTERVAL_HOUR_TO_MINUTE

      public static final H2Type INTERVAL_HOUR_TO_MINUTE
      The INTERVAL HOUR TO MINUTE data type.
    • INTERVAL_HOUR_TO_SECOND

      public static final H2Type INTERVAL_HOUR_TO_SECOND
      The INTERVAL HOUR TO SECOND data type.
    • INTERVAL_MINUTE_TO_SECOND

      public static final H2Type INTERVAL_MINUTE_TO_SECOND
      The INTERVAL MINUTE TO SECOND data type.
    • JAVA_OBJECT

      public static final H2Type JAVA_OBJECT
      The JAVA_OBJECT data type.
    • ENUM

      public static final H2Type ENUM
      The ENUM data type.
    • GEOMETRY

      public static final H2Type GEOMETRY
      The GEOMETRY data type.
    • JSON

      public static final H2Type JSON
      The JSON data type.
    • UUID

      public static final H2Type UUID
      The UUID data type.
  • Method Details

    • array

      public static H2Type array(H2Type componentType)
      Returns ARRAY data type with the specified component type.
      Parameters:
      componentType - the type of elements
      Returns:
      ARRAY data type
    • row

      public static H2Type row(H2Type... fieldTypes)
      Returns ROW data type with specified types of fields and default names.
      Parameters:
      fieldTypes - the type of fields
      Returns:
      ROW data type
    • getName

      public String getName()
      Specified by:
      getName in interface SQLType
    • getVendor

      public String getVendor()
      Specified by:
      getVendor in interface SQLType
    • getVendorTypeNumber

      public Integer getVendorTypeNumber()
      Returns the vendor specific type number for the data type. The returned value is actual only for the current version of H2.
      Specified by:
      getVendorTypeNumber in interface SQLType
      Returns:
      the vendor specific data type
    • toString

      public String toString()
      Overrides:
      toString in class Object