diff --git a/jOOQ/src/main/java/org/jooq/GroupField.java b/jOOQ/src/main/java/org/jooq/GroupField.java index f34ea44467..f14374c0bc 100644 --- a/jOOQ/src/main/java/org/jooq/GroupField.java +++ b/jOOQ/src/main/java/org/jooq/GroupField.java @@ -65,6 +65,14 @@ import org.jooq.impl.QOM; * * @author Lukas Eder */ -public /* sealed */ interface GroupField extends QueryPart /* permits Table, Field, QOM.Rollup, QOM.Cube, QOM.GroupingSets */ { - -} +public /* sealed */ interface GroupField +extends + QueryPart +/* permits + Table, + Field, + QOM.EmptyGroupingSet, + QOM.Rollup, + QOM.Cube, + QOM.GroupingSets */ +{} diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index c8aaf7964b..dd97aac36e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -24265,6 +24265,26 @@ public class DSL { // XXX Construction of GROUPING SET functions // ------------------------------------------------------------------------ + /** + * Create a GROUPING SETS(field1, field2, .., fieldn) grouping field where + * each grouping set only consists of a single field. + *
+ * Please check the SQL Server documentation for a very nice explanation of
+ * CUBE, ROLLUP, and GROUPING SETS
+ * clauses in grouping contexts: http://msdn.microsoft.com/en-US/library/bb522495.aspx
+ *
+ * @param fields The fields that are part of the GROUPING SETS
+ * function
+ * @return A field to be used in a GROUP BY clause
+ */
+ @NotNull
+ @Support({ POSTGRES })
+ public static GroupField emptyGroupingSet() {
+ return EmptyGroupingSet.INSTANCE;
+ }
+
/**
* Create a ROLLUP(field1, field2, .., fieldn) grouping field.
*
@@ -24279,16 +24299,6 @@ public class DSL {
/**
* Create a ROLLUP(field1, field2, .., fieldn) grouping field.
*
- * This has been observed to work with the following databases: - *
* Please check the SQL Server documentation for a very nice explanation of
*
* Please check the SQL Server documentation for a very nice explanation of
*
* Please check the SQL Server documentation for a very nice explanation of
*
* Please check the SQL Server documentation for a very nice explanation of
* CUBE, ROLLUP, and GROUPING SETS
* clauses in grouping contexts:
- * This has been observed to work with the following databases:
- *
- *
- * CUBE, ROLLUP, and GROUPING SETS
* clauses in grouping contexts:
- * This has been observed to work with the following databases:
- *
- *
- * CUBE, ROLLUP, and GROUPING SETS
* clauses in grouping contexts:
- * This has been observed to work with the following databases:
- *
- *
- * CUBE, ROLLUP, and GROUPING SETS
* clauses in grouping contexts:
- * This has been observed to work with the following databases:
- *
- *
- *