Modul org.jooq
Package org.jooq

Enum-Klasse SQLDialect

Alle implementierten Schnittstellen:
Serializable, Comparable<SQLDialect>, Constable

public enum SQLDialect extends Enum<SQLDialect>
Dialects and dialect families as supported by jOOQ.

The commercial jOOQ distributions support a variety of dialects, which are grouped into dialect families. For instance, the PostgreSQL dialect family POSTGRES is specialised by its dialects

  • Ungültige Referenz
    #POSTGRES_9_3
  • Ungültige Referenz
    #POSTGRES_9_4
  • Ungültige Referenz
    #POSTGRES_9_5
  • Ungültige Referenz
    #POSTGRES_10
  • Ungültige Referenz
    #POSTGRES_11
  • Ungültige Referenz
    #POSTGRES_12
  • Ungültige Referenz
    #POSTGRES_13
  • Ungültige Referenz
    #POSTGRES_14

The open source jOOQ distributions only support the dialect family, which corresponds to the latest supported dialect version of the commercial distribution. A full list of mappings between dialect families and latest supported version can be seen here https://www.jooq.org/download/support-matrix.

If a dialect is documented but does not seem to be available in your jOOQ Edition, you may be using the wrong edition, e.g. because of a transitive dependency introduced by Spring Boot. See this article about how to exclude such transitive dependencies from your classpath https://blog.jooq.org/how-to-use-jooqs-commercial-distributions-with-spring-boot/.

Autor:
Lukas Eder
  • Enum-Konstanten - Details

    • DEFAULT

      public static final SQLDialect DEFAULT
      The default SQL dialect.

      This dialect is chosen in the absence of a more explicit dialect. It is not intended to be used with any actual database as it may combined dialect-specific things from various dialects.

    • CLICKHOUSE

      @Experimental public static final SQLDialect CLICKHOUSE
      The ClickHouse dialect family.

      This dialect is in EXPERIMENTAL state. The dialect works very differently from most more standards compliant dialects, and we're still exploring how much we should tweak generated SQL to make ClickHouse behave more. The main difference is in how NULL values are handled. While NOT NULL being the default modifier on a type is a reasonable choice, auto-converting all NULL values to the type's default (e.g. 0 for INTEGER) seems like a stretch, and hard to prevent via jOOQ's standardisation.

    • CUBRID

      @Deprecated(forRemoval=true, since="3.13") public static final SQLDialect CUBRID
      Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.
      - [#9403] - 3.13.0 - This dialect is hardly used by anyone with jOOQ or without jOOQ and will be removed in the near future.
      The CUBRID dialect family.
    • DERBY

      @Deprecated(forRemoval=true, since="3.20") public static final SQLDialect DERBY
      Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.
      - [#19224] - 3.21.0 - This dialect has been unsupported by the vendor and will be removed in the near future. See https://issues.apache.org/jira/browse/DERBY-7177
      The Apache Derby dialect family.
    • DUCKDB

      public static final SQLDialect DUCKDB
      The DuckDB dialect family.
    • FIREBIRD

      public static final SQLDialect FIREBIRD
      The Firebird dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #FIREBIRD_3_0
      .
    • H2

      public static final SQLDialect H2
      The H2 dialect family.
    • HSQLDB

      public static final SQLDialect HSQLDB
      The Hypersonic dialect family.
    • IGNITE

      @Deprecated(forRemoval=true, since="3.16") public static final SQLDialect IGNITE
      Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.
      - [#12465] - 3.16.0 - This dialect is hardly used by anyone with jOOQ or without jOOQ and will be removed in the near future. If you're actively using this dialect, please get in touch for extended support: https://github.com/jOOQ/jOOQ/issues/12465
      The Apache Ignite dialect family.
    • MARIADB

      public static final SQLDialect MARIADB
      The MariaDB dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #MARIADB_10_5
      .
    • MYSQL

      public static final SQLDialect MYSQL
      The MySQL dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #MYSQL_8_0_31
      .
    • POSTGRES

      public static final SQLDialect POSTGRES
      The PostgreSQL dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #POSTGRES_18
      .

      While this family (and its dialects) have been observed to work to some extent on Amazon RedShift as well, we strongly suggest you use the official

      Ungültige Referenz
      #REDSHIFT
      support, instead.
    • SQLITE

      public static final SQLDialect SQLITE
      The SQLite dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #SQLITE_3_45
      .
    • TRINO

      public static final SQLDialect TRINO
      The Trino dialect family.
    • YUGABYTEDB

      public static final SQLDialect YUGABYTEDB
      The YugabyteDB dialect family.

      This family behaves like the versioned dialect

      Ungültige Referenz
      #YUGABYTEDB_2_25
      .
  • Methodendetails

    • values

      public static SQLDialect[] values()
      Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.
      Gibt zurück:
      ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration
    • valueOf

      public static SQLDialect valueOf(String name)
      Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enum-Konstante in dieser Klasse deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)
      Parameter:
      name - Name der zurückzugebenden Enumerationskonstante.
      Gibt zurück:
      Enumerationskonstante mit dem angegebenen Namen
      Löst aus:
      IllegalArgumentException - wenn diese Enum-Klasse keine Konstante mit dem angegebenen Namen enthält
      NullPointerException - wenn das Argument nicht angegeben wird
    • families

      @NotNull public static final @NotNull SQLDialect @NotNull [] families()
      Get a list of all family() values.
    • predecessors

      @NotNull public static final @NotNull Set<SQLDialect> predecessors(SQLDialect... dialects)
      Get a set of dialects preceding a given set of dialects.

      The resulting set of dialects contain all the families and dialect versions that precede the argument dialects, including the argument dialects.

    • supportedUntil

      @NotNull public static final @NotNull Set<SQLDialect> supportedUntil(SQLDialect dialect)
      Get a set of supported dialect versions and predecessors given a dialect version.

      The resulting set of dialects contain all the families and dialect versions that precede the argument dialect, including the argument dialect.

    • supportedUntil

      @NotNull public static final @NotNull Set<SQLDialect> supportedUntil(SQLDialect... dialects)
      Get a set of supported dialect versions and predecessors given a dialect version.

      The resulting set of dialects contain all the families and dialect versions that precede the argument dialect, including the argument dialects.

    • supportedBy

      @NotNull public static final @NotNull Set<SQLDialect> supportedBy(SQLDialect dialect)
      Get a set of supported dialect versions and successors given a dialect version.

      The resulting set of dialects contain all the families and dialect versions that support the argument dialect, i.e. that succeed it, including the argument dialect.

    • supportedBy

      @NotNull public static final @NotNull Set<SQLDialect> supportedBy(SQLDialect... dialects)
      Get a set of supported dialect versions and successors given a set of dialect versions.

      The resulting set of dialects contain all the families and dialect versions that support the argument dialects, i.e. that succeed them, including the argument dialects.

    • commercial

      public final boolean commercial()
      Whether this dialect is supported with the jOOQ commercial license only.
    • supported

      public final boolean supported()
      Whether this dialect is supported by jOOQ as an output dialect.

      Unsupported, non-output dialects include:

    • family

      @NotNull public final @NotNull SQLDialect family()
      The dialect family.

      This returns the dialect itself, if it has no "parent family". E.g.

      
       SQLSERVER == SQLSERVER2012.family();
       SQLSERVER == SQLSERVER2008.family();
       SQLSERVER == SQLSERVER.family();
       
    • category

      @NotNull public final @NotNull SQLDialectCategory category()
      The dialect category.
    • isFamily

      public final boolean isFamily()
      Whether this dialect is a family().
    • isVersioned

      public final boolean isVersioned()
      Whether this dialect is a versioned dialect or a family with versioned dialects.
    • predecessor

      @NotNull public final @NotNull SQLDialect predecessor()
      The predecessor dialect.

      If this is a dialect version (e.g.

      Ungültige Referenz
      #POSTGRES_9_4
      ) within a family (e.g. POSTGRES), then the predecessor will point to the historically previous dialect version (e.g.
      Ungültige Referenz
      #POSTGRES_9_3
      ) within the same family, or to the dialect itself if there was no predecessor explicitly supported by jOOQ.
    • predecessors

      @NotNull public final @NotNull Set<SQLDialect> predecessors()
      The predecessor dialects.

      Recursively calls predecessor() and finds all the preceding dialects to this one, including this one.

    • precedes

      public final boolean precedes(SQLDialect other)
      Whether this dialect precedes another dialect from the same family.

      This returns:

      • true if this dialect is the same as the other dialect
      • true if this dialect precedes the other dialect via any number of calls to predecessor()
      The above also implies that:
      • false if the two dialects do not belong to the same family

      This is useful to see if some feature is supported by "at least" a given dialect version. Example:

      
       // Do this block only if the chosen dialect supports PostgreSQL 9.4+ features
       if (POSTGRES_9_4.precedes(dialect)) {
       }
      
       // Do this block only if the chosen dialect supports PostgreSQL 9.3+ features
       else if (POSTGRES_9_3.precedes(dialect)) {
       }
      
       // Fall back to pre-PostgreSQL 9.3 behaviour
       else {
       }
       
    • precedesStrictly

      public final boolean precedesStrictly(SQLDialect other)
      Whether this dialect strictly precedes another dialect from the same family.

      This returns:

      • false if this dialect is the same as the other dialect
      • true if this dialect precedes the other dialect via any number of calls to predecessor()
      The above also implies that:
      • false if the two dialects do not belong to the same family

      This is useful to see if some feature is supported by "at least" a given dialect version. Example:

       
       // Do this block only if the chosen dialect was before PostgreSQL 9.3-
       if (dialect.precedesStrictly(POSTGRES)) {
       }
      
       // Do this block only if the chosen dialect was before PostgreSQL 9.4-
       else if (dialect.precedesStrictly(POSTGRES)) {
       }
      
       // Fall back to post-PostgreSQL 9.4+ behaviour
       else {
       }
       
       
    • supports

      public final boolean supports(SQLDialect other)
      Check whether this dialect supports another one.

      This is:

      • false if dialects don't belong to the same family
      • true if either dialect isFamily()
      • true if other dialect precedes this dialect

      The other argument dialect is typically referenced from a Support annotation, whereas this dialect is the user dialect.

    • supports

      @Deprecated(forRemoval=true, since="3.14") public final boolean supports(Collection<SQLDialect> other)
      Veraltet, zur Entfernung: Dieses API-Element wird in einer zukünftigen Version entfernt.
      - [#9882] - 3.14.0 - Use supportedBy(SQLDialect...) instead
      Check whether this dialect supports any dialect from the argument collection.
    • supportsDatabaseVersion

      public final boolean supportsDatabaseVersion(int majorVersion, int minorVersion, String productVersion)
    • getName

      @NotNull public final @NotNull String getName()
      The name of this dialect as it appears in related class names.
    • getNameLC

      @NotNull public final @NotNull String getNameLC()
      The name of this dialect as it appears in related package names.
    • getNameUC

      @NotNull public final @NotNull String getNameUC()
      The name of this dialect as it appears in related enum values.
    • thirdParty

      @NotNull public final @NotNull SQLDialect.ThirdParty thirdParty()
      Get access to third party representations of this SQLDialect.