From 71abb7450173191fb984631755fb9a6b709e414b Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Fri, 27 Jun 2014 14:17:16 +0200 Subject: [PATCH] [#3356] Deprecate Select.fetchCount() --- jOOQ/src/main/java/org/jooq/Select.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; }