diff --git a/jOOQ/src/main/java/org/jooq/SQLDialect.java b/jOOQ/src/main/java/org/jooq/SQLDialect.java index 4a91954a42..92c6448f7a 100644 --- a/jOOQ/src/main/java/org/jooq/SQLDialect.java +++ b/jOOQ/src/main/java/org/jooq/SQLDialect.java @@ -65,7 +65,7 @@ public enum SQLDialect { * pseudo-dialect. */ @Deprecated - SQL99("", false, false), + SQL99("", false, true, false), /** * The default SQL dialect. @@ -74,12 +74,68 @@ public enum SQLDialect { * not intended to be used with any actual database as it may combined * dialect-specific things from various dialects. */ - DEFAULT("", false, false), + DEFAULT("", false, true, false), // ------------------------------------------------------------------------- - // SQL dialects for free usage + // SQL dialects for free usage, included in the jOOQ Lite Edition // ------------------------------------------------------------------------- + /** + * The Apache Derby dialect family. + */ + DERBY("Derby", false, true, true), + + /** + * The H2 dialect family. + */ + H2("H2", false, true, true), + + /** + * The Hypersonic dialect family. + */ + HSQLDB("HSQLDB", false, true, true), + + /** + * The SQLite dialect family. + *

+ * This family behaves like the versioned dialect {@link #SQLITE_3_30}. + */ + SQLITE("SQLite", false, true, true), + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // ------------------------------------------------------------------------- + // SQL dialects for free usage, included in the jOOQ Open Source Edition + // ------------------------------------------------------------------------- + + + /** * The CUBRID dialect family. * @@ -88,19 +144,15 @@ public enum SQLDialect { * future. */ @Deprecated - CUBRID("CUBRID", false, true), - - /** - * The Apache Derby dialect family. - */ - DERBY("Derby", false, true), + CUBRID("CUBRID", false, false, true), /** * The Firebird dialect family. *

* This family behaves like the versioned dialect {@link #FIREBIRD_3_0}. */ - FIREBIRD("Firebird", false, true), + FIREBIRD("Firebird", false, false, true), + @@ -120,22 +172,14 @@ public enum SQLDialect { - /** - * The H2 dialect family. - */ - H2("H2", false, true), - /** - * The Hypersonic dialect family. - */ - HSQLDB("HSQLDB", false, true), /** * The MariaDB dialect family. *

* This family behaves like the versioned dialect {@link #MARIADB_10_5}. */ - MARIADB("MariaDB", false, true), + MARIADB("MariaDB", false, false, true), @@ -194,7 +238,9 @@ public enum SQLDialect { *

* This family behaves like the versioned dialect {@link #MYSQL_8_0_19}. */ - MYSQL("MySQL", false, true), + MYSQL("MySQL", false, false, true), + + @@ -231,7 +277,7 @@ public enum SQLDialect { * extent on Amazon RedShift as well, we strongly suggest you use the * official {@link #REDSHIFT} support, instead. */ - POSTGRES("Postgres", false, true), + POSTGRES("Postgres", false, false, true), @@ -286,38 +332,6 @@ public enum SQLDialect { - - - - - - - - - - - - - - - - - - - - - - /** - * The SQLite dialect family. - *

- * This family behaves like the versioned dialect {@link #SQLITE_3_30}. - */ - SQLITE("SQLite", false, true), - - - - - @@ -636,6 +650,7 @@ public enum SQLDialect { private final String name; private final boolean commercial; + private final boolean lite; private final boolean supported; private final SQLDialect family; private SQLDialect predecessor; @@ -725,17 +740,18 @@ public enum SQLDialect { supported.add(candidate); } - private SQLDialect(String name, boolean commercial, boolean supported) { - this(name, commercial, supported, null, null); + private SQLDialect(String name, boolean commercial, boolean lite, boolean supported) { + this(name, commercial, lite, supported, null, null); } - private SQLDialect(String name, boolean commercial, boolean supported, SQLDialect family) { - this(name, commercial, supported, family, null); + private SQLDialect(String name, boolean commercial, boolean lite, boolean supported, SQLDialect family) { + this(name, commercial, lite, supported, family, null); } - private SQLDialect(String name, boolean commercial, boolean supported, SQLDialect family, SQLDialect predecessor) { + private SQLDialect(String name, boolean commercial, boolean lite, boolean supported, SQLDialect family, SQLDialect predecessor) { this.name = name; this.commercial = commercial; + this.lite = lite; this.supported = supported; this.family = family == null ? this : family; this.predecessor = predecessor == null ? this : predecessor; @@ -746,6 +762,13 @@ public enum SQLDialect { this.thirdParty = new ThirdParty(); } + /** + * Whether this dialect is supported also in the jOOQ Lite Edition. + */ + public final boolean lite() { + return lite; + } + /** * Whether this dialect is supported with the jOOQ commercial license only. */