From c15f770d427a0bfa26ca3befb8be77ae7ec7424c Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Mon, 24 Feb 2020 13:14:39 +0100 Subject: [PATCH] [jOOQ/jOOQ#9833] Add missing @Support annotation to DSLContext#fetch*() methods --- jOOQ/src/main/java/org/jooq/DSLContext.java | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index 54eebdf8a1..210334d17f 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -3820,6 +3820,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The transformed result. This will never be null. * @see #fetchFromStringData(List) */ + @Support Result fetchFromStringData(String[]... data); /** @@ -3839,6 +3840,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @param data The data to be transformed into a Result * @return The transformed result. This will never be null. */ + @Support Result fetchFromStringData(List data); /** @@ -3858,6 +3860,7 @@ public interface DSLContext extends Scope , AutoCloseable { * names. * @return The transformed result. This will never be null. */ + @Support Result fetchFromStringData(List data, boolean header); // ------------------------------------------------------------------------- @@ -10806,6 +10809,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see ResultQuery#fetch() */ + @Support Result fetch(ResultQuery query) throws DataAccessException; /** @@ -10817,6 +10821,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see ResultQuery#fetchLazy() */ + @Support Cursor fetchLazy(ResultQuery query) throws DataAccessException; @@ -10833,6 +10838,7 @@ public interface DSLContext extends Scope , AutoCloseable { * null. * @see ResultQuery#fetchAsync() */ + @Support CompletionStage> fetchAsync(ResultQuery query); /** @@ -10844,6 +10850,7 @@ public interface DSLContext extends Scope , AutoCloseable { * null. * @see ResultQuery#fetchAsync() */ + @Support CompletionStage> fetchAsync(Executor executor, ResultQuery query); /** @@ -10855,6 +10862,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see ResultQuery#stream() */ + @Support Stream fetchStream(ResultQuery query) throws DataAccessException; @@ -10867,6 +10875,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see ResultQuery#fetchMany() */ + @Support Results fetchMany(ResultQuery query) throws DataAccessException; /** @@ -10879,6 +10888,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws TooManyRowsException if the query returned more than one record * @see ResultQuery#fetchOne() */ + @Support R fetchOne(ResultQuery query) throws DataAccessException, TooManyRowsException; /** @@ -10892,6 +10902,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws TooManyRowsException if the query returned more than one record * @see ResultQuery#fetchSingle() */ + @Support R fetchSingle(ResultQuery query) throws DataAccessException, NoDataFoundException, TooManyRowsException; @@ -10905,6 +10916,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws TooManyRowsException if the query returned more than one record * @see ResultQuery#fetchOptional() */ + @Support Optional fetchOptional(ResultQuery query) throws DataAccessException, TooManyRowsException; @@ -10916,6 +10928,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @throws TooManyRowsException if the query returned more than one record */ + @Support T fetchValue(Table> table) throws DataAccessException, TooManyRowsException; /** @@ -10927,6 +10940,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @throws TooManyRowsException if the query returned more than one record */ + @Support > T fetchValue(ResultQuery query) throws DataAccessException, TooManyRowsException; /** @@ -10938,6 +10952,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @throws TooManyRowsException if the query returned more than one record */ + @Support T fetchValue(TableField field) throws DataAccessException, TooManyRowsException; /** @@ -10948,6 +10963,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The value or null, if no record was found. * @throws DataAccessException if something went wrong executing the query */ + @Support T fetchValue(Field field) throws DataAccessException; @@ -10962,6 +10978,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws InvalidResultException if the query returned a record with more * than one value */ + @Support > Optional fetchOptionalValue(ResultQuery query) throws DataAccessException, TooManyRowsException, InvalidResultException; /** @@ -10975,6 +10992,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws InvalidResultException if the query returned a record with more * than one value */ + @Support Optional fetchOptionalValue(TableField field) throws DataAccessException, TooManyRowsException, InvalidResultException; @@ -10985,6 +11003,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The values. This will never be null. * @throws DataAccessException if something went wrong executing the query */ + @Support List fetchValues(Table> table) throws DataAccessException; /** @@ -10995,6 +11014,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The values. This will never be null. * @throws DataAccessException if something went wrong executing the query */ + @Support > List fetchValues(ResultQuery query) throws DataAccessException; /** @@ -11004,6 +11024,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The values. This will never be null. * @throws DataAccessException if something went wrong executing the query */ + @Support List fetchValues(TableField field) throws DataAccessException; /** @@ -11014,6 +11035,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see DSL#condition(Record) */ + @Support > Result fetchByExample(R example) throws DataAccessException; /** @@ -11038,6 +11060,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The COUNT(*) result * @throws DataAccessException if something went wrong executing the query */ + @Support int fetchCount(Select query) throws DataAccessException; /** @@ -11049,6 +11072,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The number of records in the table * @throws DataAccessException if something went wrong executing the query */ + @Support int fetchCount(Table table) throws DataAccessException; /** @@ -11061,6 +11085,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The number of records in the table that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support int fetchCount(Table table, Condition condition) throws DataAccessException; /** @@ -11077,6 +11102,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The number of records in the table that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support int fetchCount(Table table, Condition... conditions) throws DataAccessException; /** @@ -11093,6 +11119,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The number of records in the table that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support int fetchCount(Table table, Collection conditions) throws DataAccessException; /** @@ -11114,6 +11141,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return The EXISTS(...) result * @throws DataAccessException if something went wrong executing the query */ + @Support boolean fetchExists(Select query) throws DataAccessException; /** @@ -11125,6 +11153,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return Whether the table contains any records * @throws DataAccessException if something went wrong executing the query */ + @Support boolean fetchExists(Table table) throws DataAccessException; /** @@ -11136,6 +11165,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return Whether the table contains any records that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support boolean fetchExists(Table table, Condition condition) throws DataAccessException; /** @@ -11150,6 +11180,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return Whether the table contains any records that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support boolean fetchExists(Table table, Condition... conditions) throws DataAccessException; /** @@ -11164,6 +11195,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @return Whether the table contains any records that satisfy a condition * @throws DataAccessException if something went wrong executing the query */ + @Support boolean fetchExists(Table table, Collection conditions) throws DataAccessException; /** @@ -11174,6 +11206,7 @@ public interface DSLContext extends Scope , AutoCloseable { * @throws DataAccessException if something went wrong executing the query * @see Query#execute() */ + @Support int execute(Query query) throws DataAccessException; // -------------------------------------------------------------------------