Enum Class SqlDbType

java.lang.Object
java.lang.Enum<SqlDbType>
io.micronaut.data.model.schema.sql.SqlDbType
All Implemented Interfaces:
Serializable, Comparable<SqlDbType>, Constable

@Internal public enum SqlDbType extends Enum<SqlDbType>
Provides constants and utility methods for working with database types. This is basically mapping of Types with some additional field type values with option to adding new types later if needed. This class contains constants for various database types, such as numeric, character, and date/time types. It also provides methods for checking whether a given type code represents a specific type, such as a numeric or character type.
Since:
4.13.0
Author:
radovanradic
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A type code representing the generic SQL type ARRAY.
    A type code representing the generic SQL type BIGINT.
    A type code representing the generic SQL type BINARY.
    A type code representing generic SQL type BIT.
    A type code representing the generic SQL type BLOB.
    A type code representing the generic SQL type BOOLEAN.
    A type code representing the generic SQL type CHAR.
    A type code representing the generic SQL type CLOB.
    A type code representing the generic SQL type DATALINK.
    A type code representing the generic SQL type DATE.
    A type code representing the generic SQL type DECIMAL.
    A type code representing the generic SQL type DISTINCT.
    A type code representing the generic SQL type DOUBLE.
    A type code representing the generic SQL type ENUM.
    A type code representing the generic SQL type FLOAT.
    A type code representing the generic SQL type INTEGER.
    A type code representing the generic SQL type JAVA_OBJECT.
    A type code representing the generic SQL type JSON.
    A type code representing the generic SQL type LONGNVARCHAR.
    A type code representing the generic SQL type LONGVARBINARY.
    A type code representing the generic SQL type LONGVARCHAR.
    A type code representing the generic SQL type NCHAR.
    A type code representing the generic SQL type NCLOB.
    A type code representing the generic SQL value NULL.
    A type code representing the generic SQL type NUMERIC.
    A type code representing the generic SQL type NVARCHAR.
    A type code indicating that the SQL type is SQL dialect-specific and is mapped to a Java object that can be accessed via the methods ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int).
    A type code representing the generic SQL type REAL.
    A type code representing the generic SQL type REF.
    A type code representing the generic SQL type REF CURSOR.
    A type code representing the generic SQL type ROWID.
    A type code representing the generic SQL type SMALLINT.
    A type code representing the generic SQL type XML.
    A type code representing the generic SQL type STRUCT.
    A type code representing the generic SQL type TIME.
    A type code representing identifies the generic SQL type TIME WITH TIMEZONE.
    A type code representing the generic SQL type TIMESTAMP.
    A type code representing the generic SQL type TIMESTAMP WITH TIMEZONE.
    A type code representing the generic SQL type TINYINT.
    A type code representing the generic SQL type UUID.
    A type code representing the generic SQL type VARBINARY.
    A type code representing the generic SQL type VARCHAR.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the integer representation of the database type.
    static SqlDbType
    Returns the enum constant of this class with the specified name.
    static SqlDbType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BIT

      public static final SqlDbType BIT
      A type code representing generic SQL type BIT.
      See Also:
    • TINYINT

      public static final SqlDbType TINYINT
      A type code representing the generic SQL type TINYINT.
      See Also:
    • SMALLINT

      public static final SqlDbType SMALLINT
      A type code representing the generic SQL type SMALLINT.
      See Also:
    • INTEGER

      public static final SqlDbType INTEGER
      A type code representing the generic SQL type INTEGER.
      See Also:
    • BIGINT

      public static final SqlDbType BIGINT
      A type code representing the generic SQL type BIGINT.
      See Also:
    • FLOAT

      public static final SqlDbType FLOAT
      A type code representing the generic SQL type FLOAT.
      See Also:
    • REAL

      public static final SqlDbType REAL
      A type code representing the generic SQL type REAL.
      See Also:
    • DOUBLE

      public static final SqlDbType DOUBLE
      A type code representing the generic SQL type DOUBLE.
      See Also:
    • NUMERIC

      public static final SqlDbType NUMERIC
      A type code representing the generic SQL type NUMERIC.
      See Also:
    • DECIMAL

      public static final SqlDbType DECIMAL
      A type code representing the generic SQL type DECIMAL.
      See Also:
    • CHAR

      public static final SqlDbType CHAR
      A type code representing the generic SQL type CHAR.
      See Also:
    • VARCHAR

      public static final SqlDbType VARCHAR
      A type code representing the generic SQL type VARCHAR.
      See Also:
    • LONGVARCHAR

      public static final SqlDbType LONGVARCHAR
      A type code representing the generic SQL type LONGVARCHAR.
    • DATE

      public static final SqlDbType DATE
      A type code representing the generic SQL type DATE.
      See Also:
    • TIME

      public static final SqlDbType TIME
      A type code representing the generic SQL type TIME.
      See Also:
    • TIMESTAMP

      public static final SqlDbType TIMESTAMP
      A type code representing the generic SQL type TIMESTAMP.
      See Also:
    • BINARY

      public static final SqlDbType BINARY
      A type code representing the generic SQL type BINARY.
      See Also:
    • VARBINARY

      public static final SqlDbType VARBINARY
      A type code representing the generic SQL type VARBINARY.
      See Also:
    • LONGVARBINARY

      public static final SqlDbType LONGVARBINARY
      A type code representing the generic SQL type LONGVARBINARY.
    • NULL

      public static final SqlDbType NULL
      A type code representing the generic SQL value NULL.
      See Also:
    • OTHER

      public static final SqlDbType OTHER
      A type code indicating that the SQL type is SQL dialect-specific and is mapped to a Java object that can be accessed via the methods ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int).
      See Also:
    • JAVA_OBJECT

      public static final SqlDbType JAVA_OBJECT
      A type code representing the generic SQL type JAVA_OBJECT.
      See Also:
    • DISTINCT

      public static final SqlDbType DISTINCT
      A type code representing the generic SQL type DISTINCT.
      See Also:
    • STRUCT

      public static final SqlDbType STRUCT
      A type code representing the generic SQL type STRUCT.
      See Also:
    • ARRAY

      public static final SqlDbType ARRAY
      A type code representing the generic SQL type ARRAY.
      See Also:
    • BLOB

      public static final SqlDbType BLOB
      A type code representing the generic SQL type BLOB.
      See Also:
    • CLOB

      public static final SqlDbType CLOB
      A type code representing the generic SQL type CLOB.
      See Also:
    • REF

      public static final SqlDbType REF
      A type code representing the generic SQL type REF.
      See Also:
    • BOOLEAN

      public static final SqlDbType BOOLEAN
      A type code representing the generic SQL type BOOLEAN.
      See Also:
    • ROWID

      public static final SqlDbType ROWID
      A type code representing the generic SQL type ROWID.
      See Also:
    • NCHAR

      public static final SqlDbType NCHAR
      A type code representing the generic SQL type NCHAR.
      See Also:
    • NVARCHAR

      public static final SqlDbType NVARCHAR
      A type code representing the generic SQL type NVARCHAR.
      See Also:
    • LONGNVARCHAR

      public static final SqlDbType LONGNVARCHAR
      A type code representing the generic SQL type LONGNVARCHAR.
    • NCLOB

      public static final SqlDbType NCLOB
      A type code representing the generic SQL type NCLOB.
      See Also:
    • SQLXML

      public static final SqlDbType SQLXML
      A type code representing the generic SQL type XML.
      See Also:
    • REF_CURSOR

      public static final SqlDbType REF_CURSOR
      A type code representing the generic SQL type REF CURSOR.
      See Also:
    • TIME_WITH_TIMEZONE

      public static final SqlDbType TIME_WITH_TIMEZONE
      A type code representing identifies the generic SQL type TIME WITH TIMEZONE.
      See Also:
    • TIMESTAMP_WITH_TIMEZONE

      public static final SqlDbType TIMESTAMP_WITH_TIMEZONE
      A type code representing the generic SQL type TIMESTAMP WITH TIMEZONE.
      See Also:
    • UUID

      public static final SqlDbType UUID
      A type code representing the generic SQL type UUID. It does not have corresponding value in Types.
    • JSON

      public static final SqlDbType JSON
      A type code representing the generic SQL type JSON. It does not have corresponding value in Types.
    • ENUM

      public static final SqlDbType ENUM
      A type code representing the generic SQL type ENUM. It does not have corresponding value in Types.
  • Method Details

    • values

      public static SqlDbType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SqlDbType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      public int getType()
      Returns the integer representation of the database type.
      Returns:
      the type code of the database type