ptupitsyn commented on code in PR #1616:
URL: https://github.com/apache/ignite-3/pull/1616#discussion_r1094360340


##########
modules/api/src/main/java/org/apache/ignite/sql/Session.java:
##########
@@ -68,11 +69,57 @@ default ResultSet execute(@Nullable Transaction 
transaction, String query, @Null
      * @param arguments Arguments for the statement.
      * @return SQL query results set.
      */
-    default ResultSet execute(@Nullable Transaction transaction, Statement 
statement, @Nullable Object... arguments) {
+    default ResultSet<SqlRow> execute(@Nullable Transaction transaction, 
Statement statement, @Nullable Object... arguments) {
         Objects.requireNonNull(statement);
 
         try {
-            return new SyncResultSetAdapter(executeAsync(transaction, 
statement, arguments).join());
+            return new SyncResultSetAdapter<>(executeAsync(transaction, 
statement, arguments).join());
+        } catch (CompletionException e) {
+            throw IgniteException.wrap(e);
+        }
+    }
+
+    /**
+     * Executes single SQL statement and maps results to objects with the 
provided mapper.
+     *
+     * @param transaction Transaction to execute the statement within or 
{@code null}.
+     * @param mapper Mapper.

Review Comment:
   Good point, added more details, please check again.



##########
modules/api/src/main/java/org/apache/ignite/sql/Session.java:
##########
@@ -98,7 +145,42 @@ default ResultSet execute(@Nullable Transaction 
transaction, Statement statement
      * @return Operation future.
      * @throws SqlException If failed.
      */
-    CompletableFuture<AsyncResultSet> executeAsync(@Nullable Transaction 
transaction, Statement statement, @Nullable Object... arguments);
+    CompletableFuture<AsyncResultSet<SqlRow>> executeAsync(
+            @Nullable Transaction transaction,
+            Statement statement,
+            @Nullable Object... arguments);
+
+    /**
+     * Executes SQL statement in an asynchronous way and maps results to 
objects with the provided mapper.
+     *
+     * @param transaction Transaction to execute the statement within or 
{@code null}.
+     * @param mapper Mapper.
+     * @param query SQL query template.
+     * @param arguments Arguments for the statement.
+     * @return Operation future.
+     * @throws SqlException If failed.

Review Comment:
   Removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to