public enum SQLDialect extends Enum<SQLDialect>
jOOQ supports a variety of dialects, which are grouped into dialect families.
For instance, the SQL Server dialect family POSTGRES
is specialised
by its dialects
Enum Constant and Description |
---|
CUBRID
The CUBRID SQL dialect family.
|
DEFAULT
The default SQL dialect.
|
DERBY
The Apache Derby SQL dialect family.
|
FIREBIRD
The Firebird SQL dialect family.
|
H2
The H2 SQL dialect family.
|
HSQLDB
The Hypersonic SQL dialect family.
|
MARIADB
The MariaDB dialect family.
|
MYSQL
The MySQL dialect family.
|
POSTGRES
The PostgreSQL dialect family.
|
POSTGRES_9_3
The PostgreSQL dialect family.
|
POSTGRES_9_4
The PostgreSQL dialect family.
|
SQL99
Deprecated.
- [#3844] - 3.6.0 -
DEFAULT will replace this
pseudo-dialect. |
SQLITE
The SQLite dialect family.
|
Modifier and Type | Method and Description |
---|---|
boolean |
commercial()
Whether this dialect is supported with the jOOQ commercial license only.
|
static SQLDialect[] |
families()
Get a list of all
family() values. |
SQLDialect |
family()
The dialect family.
|
String |
getName()
The name of this dialect as it appears in related class names.
|
String |
getNameLC()
The name of this dialect as it appears in related package names.
|
String |
getNameUC()
The name of this dialect as it appears in related enum values.
|
boolean |
precedes(SQLDialect other)
Whether this dialect precedes an other dialect from the same family.
|
SQLDialect |
predecessor()
The predecessor dialect.
|
static SQLDialect |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SQLDialect[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Deprecated public static final SQLDialect SQL99
DEFAULT
will replace this
pseudo-dialect.public static final SQLDialect DEFAULT
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.
public static final SQLDialect CUBRID
public static final SQLDialect DERBY
public static final SQLDialect FIREBIRD
public static final SQLDialect H2
public static final SQLDialect HSQLDB
public static final SQLDialect MARIADB
public static final SQLDialect MYSQL
public static final SQLDialect POSTGRES
public static final SQLDialect POSTGRES_9_3
public static final SQLDialect POSTGRES_9_4
public static final SQLDialect SQLITE
public static SQLDialect[] values()
for (SQLDialect c : SQLDialect.values()) System.out.println(c);
public static SQLDialect valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final boolean commercial()
public final SQLDialect family()
This returns the dialect itself, if it has no "parent family". E.g.
SQLSERVER == SQLSERVER2012.family();
SQLSERVER == SQLSERVER2008.family();
SQLSERVER == SQLSERVER.family();
public final SQLDialect predecessor()
If this is a dialect version (e.g. POSTGRES_9_4
) within a family
(e.g. POSTGRES
), then the predecessor will point to the
historically previous dialect version (e.g. POSTGRES_9_3
) within
the same family, or to the dialect itself if there was no predecessor
explicitly supported by jOOQ.
public final boolean precedes(SQLDialect other)
This returns:
true
if this dialect is the same as the other dialecttrue
if this dialect precedes the other dialect via any
number of calls to predecessor()
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 {
}
public final String getName()
public final String getNameLC()
public final String getNameUC()
public static final SQLDialect[] families()
family()
values.Copyright © 2015. All Rights Reserved.