diff --git a/jOOQ/src/main/java/org/jooq/SQLDialect.java b/jOOQ/src/main/java/org/jooq/SQLDialect.java
index fdb9859e12..8896bc08a7 100644
--- a/jOOQ/src/main/java/org/jooq/SQLDialect.java
+++ b/jOOQ/src/main/java/org/jooq/SQLDialect.java
@@ -645,33 +645,57 @@ public enum SQLDialect {
}
/**
- * Get a set of supported dialect versions given a dialect version.
+ * 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 support the argument dialect.
+ * versions that precede the argument dialect.
+ */
+ public static final Set supportedUntil(SQLDialect dialect) {
+ return predecessors(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.
+ */
+ public static final Set supportedUntil(SQLDialect... dialects) {
+ return predecessors(dialects);
+ }
+
+ /**
+ * 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.
*/
public static final Set supportedBy(SQLDialect dialect) {
EnumSet result = EnumSet.noneOf(SQLDialect.class);
- addSupported(dialect, result);
+ addSupportedBy(dialect, result);
return Collections.unmodifiableSet(result);
}
/**
- * Get a set of supported dialect versions given a set of dialect versions.
+ * 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.
+ * versions that support the argument dialects, i.e. that succeed them.
*/
public static final Set supportedBy(SQLDialect... dialects) {
EnumSet result = EnumSet.noneOf(SQLDialect.class);
for (SQLDialect dialect : dialects)
- addSupported(dialect, result);
+ addSupportedBy(dialect, result);
return Collections.unmodifiableSet(result);
}
- private static final void addSupported(SQLDialect dialect, EnumSet supported) {
+ private static final void addSupportedBy(SQLDialect dialect, EnumSet supported) {
supported.add(dialect);
if (dialect.isFamily())
diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java
index dbac3240f7..6811888e54 100644
--- a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java
@@ -150,7 +150,6 @@ import java.sql.ResultSetMetaData;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
@@ -216,7 +215,7 @@ final class SelectQueryImpl extends AbstractResultQuery imp
private static final Set NO_SUPPORT_FOR_UPDATE_QUALIFIED = SQLDialect.supportedBy(DERBY, FIREBIRD, H2, HSQLDB);
private static final Set SUPPORT_SELECT_INTO_TABLE = SQLDialect.supportedBy(HSQLDB, POSTGRES);
static final Set SUPPORT_WINDOW_CLAUSE = SQLDialect.supportedBy(H2 /* -- See [#8279] */, MYSQL, POSTGRES /*, SQLITE -- See [#8279] [#8548] */);
- private static final Set REQUIRES_FROM_CLAUSE;
+ private static final Set REQUIRES_FROM_CLAUSE = SQLDialect.supportedUntil(CUBRID, DERBY, FIREBIRD, HSQLDB);
private static final Set REQUIRES_DERIVED_TABLE_DML = SQLDialect.supportedBy(MARIADB, MYSQL);
private static final Set EMULATE_EMPTY_GROUP_BY_OTHER = SQLDialect.supportedBy(FIREBIRD, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE);
private static final Set SUPPORT_FULL_WITH_TIES = SQLDialect.supportedBy(H2);
@@ -235,20 +234,12 @@ final class SelectQueryImpl extends AbstractResultQuery imp
- static {
- Set temp = EnumSet.copyOf(SQLDialect.supportedBy(CUBRID, DERBY, FIREBIRD, HSQLDB));
-
-
-
- REQUIRES_FROM_CLAUSE = Collections.unmodifiableSet(temp);
- }
-
private final WithImpl with;
private final SelectFieldList select;
private Table> into;
diff --git a/jOOQ/src/main/java/org/jooq/impl/Values.java b/jOOQ/src/main/java/org/jooq/impl/Values.java
index 53d0f37fc5..96d599fb8d 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Values.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Values.java
@@ -61,8 +61,6 @@ import static org.jooq.impl.Keywords.K_TABLE;
import static org.jooq.impl.Keywords.K_VALUES;
import static org.jooq.impl.Names.N_VALUES;
-import java.util.Collections;
-import java.util.EnumSet;
import java.util.Set;
import org.jooq.Context;
@@ -85,15 +83,7 @@ final class Values extends AbstractTable {
* Generated UID
*/
private static final long serialVersionUID = -637982217747670311L;
- private static final Set NO_SUPPORT_VALUES;
-
- static {
- Set temp = EnumSet.copyOf(SQLDialect.supportedBy(FIREBIRD, MARIADB));
-
-
-
- NO_SUPPORT_VALUES = Collections.unmodifiableSet(temp);
- }
+ private static final Set NO_SUPPORT_VALUES = SQLDialect.supportedUntil(FIREBIRD, MARIADB);
private final Row[] rows;