Enum Dialect

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Dialect>

    public enum Dialect
    extends java.lang.Enum<Dialect>
    The SQL dialect to use.
    Since:
    1.0.0
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ANSI
      Ansi compliant SQL.
      H2
      H2 database.
      MYSQL
      MySQL 5.5 or above.
      ORACLE
      Oracle 12c or above.
      POSTGRES
      Postgres 9.5 or later.
      SQL_SERVER
      SQL server 2012 or above.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allowBatch()
      Some drivers and dialects do not support JDBC batching.
      DataType getDataType​(DataType type)
      Returns compatible dialect dataype.
      boolean requiresStringUUID​(DataType type)
      Determines whether the data type requires string based UUIDs.
      boolean supportsArrays()
      Some databases support arrays and the use of Connection.createArrayOf(String, Object[]).
      static Dialect valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Dialect[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • H2

        public static final Dialect H2
        H2 database.
      • MYSQL

        public static final Dialect MYSQL
        MySQL 5.5 or above.
      • POSTGRES

        public static final Dialect POSTGRES
        Postgres 9.5 or later.
      • SQL_SERVER

        public static final Dialect SQL_SERVER
        SQL server 2012 or above.
      • ORACLE

        public static final Dialect ORACLE
        Oracle 12c or above.
      • ANSI

        public static final Dialect ANSI
        Ansi compliant SQL.
    • Method Detail

      • values

        public static Dialect[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Dialect c : Dialect.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Dialect valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • allowBatch

        public final boolean allowBatch()
        Some drivers and dialects do not support JDBC batching. This allows customization.
        Returns:
        True if batch is supported.
      • supportsArrays

        public final boolean supportsArrays()
        Some databases support arrays and the use of Connection.createArrayOf(String, Object[]).
        Returns:
        True if arrays are supported.
      • getDataType

        public final DataType getDataType​(@NonNull
                                          DataType type)
        Returns compatible dialect dataype.
        Parameters:
        type - the type
        Returns:
        The dialect compatible DataType
        Since:
        2.0.1
      • requiresStringUUID

        public final boolean requiresStringUUID​(@NonNull
                                                DataType type)
        Determines whether the data type requires string based UUIDs.
        Parameters:
        type - the type
        Returns:
        True if a string UUID is required
        Since:
        1.1.3