public enum SupportedDatabase extends java.lang.Enum
Internal API. Do not use it from application or plugin code. It is public only because the packages of this module that share it are separate and Java has no narrower visibility between them. It is not part of the supported Grails API: it carries no compatibility promise, and its constants, their properties and its methods can change or be removed in any release, including a patch release, without a deprecation period. A class you write against it can stop compiling, or start behaving differently, on the next upgrade.
The one declaration of the SQL databases this module supports, and of every way they differ that Grails has to know, for Hibernate 5. The Hibernate 7 module declares its own: the two Hibernate versions render different SQL for some databases, so the readings differ and are not shared. Whatever depends on the database asks it here, by the Hibernate dialect the session factory connects with:
like
where the database has no regular expression operator that Grails uses.To support another database, add a constant here with its dialect classes and its properties. The constants are tried in their declared order, so a constant for a dialect subclass is declared before the constant for its superclass, and DEFAULT, keyed on java.lang.Object, stands for every database not listed and for a dialect that is not known.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static SupportedDatabase |
forDialect(org.hibernate.dialect.Dialect dialect)Returns the database the dialect is for: DEFAULT unless its dialect is listed. |
|
public java.lang.Class<?>[] |
keyClasses() |
|
public java.lang.String |
regexPattern()The SQL that matches a value against a regular expression: {
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Enum |
java.lang.Enum#compareTo(java.lang.Enum), java.lang.Enum#compareTo(java.lang.Object), java.lang.Enum#describeConstable(), java.lang.Enum#equals(java.lang.Object), java.lang.Enum#getClass(), java.lang.Enum#getDeclaringClass(), java.lang.Enum#hashCode(), java.lang.Enum#name(), java.lang.Enum#notify(), java.lang.Enum#notifyAll(), java.lang.Enum#ordinal(), java.lang.Enum#toString(), java.lang.Enum#valueOf(java.lang.Class, java.lang.String), java.lang.Enum#wait(), java.lang.Enum#wait(long), java.lang.Enum#wait(long, int) |
Returns the database the dialect is for: DEFAULT unless its dialect is listed.
The SQL that matches a value against a regular expression: ?1 is the value and ?2 the pattern.
It is like for a database that has no regular expression operator that Grails uses.