diff --git a/jOOQ/src/main/java/org/jooq/OrderProvider.java b/jOOQ/src/main/java/org/jooq/OrderProvider.java index 44454d3b4b..c1cb108b04 100644 --- a/jOOQ/src/main/java/org/jooq/OrderProvider.java +++ b/jOOQ/src/main/java/org/jooq/OrderProvider.java @@ -84,6 +84,10 @@ public interface OrderProvider { * Adds ordering fields *
* Indexes start at 1 in SQL!
+ *
+ * Note, you can use addOrderBy(Factory.val(1).desc()) or
+ * addOrderBy(Factory.literal(1).desc()) to apply descending
+ * ordering
*
* @param fieldIndexes The ordering fields
*/
@@ -108,8 +112,9 @@ public interface OrderProvider {
*
* If there is no LIMIT or TOP clause in your
* RDBMS, or the LIMIT or TOP clause does not
- * support bind values, this may be simulated with a ROW_NUMBER()
- * window function and nested SELECT statements.
+ * support bind values, this may be simulated with a
+ * ROW_NUMBER() window function and nested SELECT
+ * statements.
*
* This is the same as calling {@link #addLimit(int, int)} with offset = 0
*
@@ -144,8 +149,8 @@ public interface OrderProvider {
* If there is no LIMIT or TOP clause in your
* RDBMS, or the LIMIT or TOP clause does not
* support bind values, or if your RDBMS does not natively support offsets,
- * this may be simulated with a ROW_NUMBER() window function and
- * nested SELECT statements.
+ * this may be simulated with a ROW_NUMBER() window function
+ * and nested SELECT statements.
*
* @param offset The lowest offset starting at 0
* @param numberOfRows The number of rows to return
@@ -162,8 +167,8 @@ public interface OrderProvider {
* If there is no LIMIT or TOP clause in your
* RDBMS, or the LIMIT or TOP clause does not
* support bind values, or if your RDBMS does not natively support offsets,
- * this may be simulated with a ROW_NUMBER() window function and
- * nested SELECT statements.
+ * this may be simulated with a ROW_NUMBER() window function
+ * and nested SELECT statements.
*
* @param offset The lowest offset starting at 0
* @param numberOfRows The number of rows to return
diff --git a/jOOQ/src/main/java/org/jooq/SelectOrderByStep.java b/jOOQ/src/main/java/org/jooq/SelectOrderByStep.java
index 4b1ad7c989..a4a7013ea6 100644
--- a/jOOQ/src/main/java/org/jooq/SelectOrderByStep.java
+++ b/jOOQ/src/main/java/org/jooq/SelectOrderByStep.java
@@ -103,6 +103,10 @@ public interface SelectOrderByStep extends SelectLimitStep {
* Add an ORDER BY clause to the query
*
* Indexes start at 1 in SQL!
+ *
+ * Note, you can use
* Indexes start at
+ * Note, you can use orderBy(Factory.val(1).desc()) or
+ * orderBy(Factory.literal(1).desc()) to apply descending
+ * ordering
*/
@Support
SelectLimitStep orderBy(int... fieldIndexes);
diff --git a/jOOQ/src/main/java/org/jooq/SimpleSelectOrderByStep.java b/jOOQ/src/main/java/org/jooq/SimpleSelectOrderByStep.java
index 7c24374911..2333e9a0f8 100644
--- a/jOOQ/src/main/java/org/jooq/SimpleSelectOrderByStep.java
+++ b/jOOQ/src/main/java/org/jooq/SimpleSelectOrderByStep.java
@@ -80,6 +80,10 @@ public interface SimpleSelectOrderByStepORDER BY clause to the query
* 1 in SQL!
+ * orderBy(Factory.val(1).desc()) or
+ * orderBy(Factory.literal(1).desc()) to apply descending
+ * ordering
*/
@Support
SimpleSelectLimitStep