diff --git a/jOOQ/src/main/java/org/jooq/Select.java b/jOOQ/src/main/java/org/jooq/Select.java index a11a8a211e..175453eddb 100644 --- a/jOOQ/src/main/java/org/jooq/Select.java +++ b/jOOQ/src/main/java/org/jooq/Select.java @@ -82,8 +82,8 @@ public interface Select extends ResultQuery, TableLike, List> getSelect(); /** - * Execute this query in the context of its attached executor and return - * a COUNT(*) value. + * Execute this query in the context of its attached executor and return a + * COUNT(*) value. *

* This wraps a pre-existing SELECT query in another one to * calculate the COUNT(*) value, without modifying the original @@ -101,6 +101,15 @@ public interface Select extends ResultQuery, TableLike, * * @return The COUNT(*) result * @throws DataAccessException if something went wrong executing the query + * @deprecated - 3.5.0 - [#3356] - This method is being removed as it is + * confusingly different from all the other types of + * {@link #fetch()} methods, in that it modifies the original + * {@link Select} statement by wrapping it. In particular, this + * method can be easily confused with {@link #fetch(Field)}, or + * more concretely fetch(count()), which has an + * entirely different semantics. Use + * {@link DSLContext#fetchCount(Select)} instead. */ + @Deprecated int fetchCount() throws DataAccessException; }