zstan commented on code in PR #2906:
URL: https://github.com/apache/ignite-3/pull/2906#discussion_r1416705180
##########
modules/jdbc/src/main/java/org/apache/ignite/internal/jdbc/JdbcResultSet.java:
##########
@@ -201,6 +205,37 @@ public JdbcResultSet(List<List<Object>> rows,
List<JdbcColumnMeta> meta) throws
initColumnOrder();
}
+ JdbcResultSet getNextResultSet() throws SQLException {
+ try {
+ JdbcGetMoreResultsRequest req = new
JdbcGetMoreResultsRequest(cursorId);
+ JdbcGetMoreResultsResult res =
cursorHandler.getMoreResultsAsync(req).get();
+
+ if (!res.hasResults()) {
+ return null;
+ }
+
+ long cursorId0 = res.cursorId();
+
+ long updCount = 0;
+
+ if (res.isDml()) {
+ CompletableFuture<JdbcQueryFetchResult> fetch =
cursorHandler.fetchAsync(
+ new JdbcQueryFetchRequest(cursorId0, 1));
+ JdbcQueryFetchResult fetchRes = fetch.get();
+ updCount = (long) fetchRes.items().get(0).get(0);
+ }
+
+ return new JdbcResultSet(cursorHandler, stmt, cursorId0,
getFetchSize(), false, Collections.emptyList(), res.isQuery(),
Review Comment:
but .. in case if some one not planned to use this prefetched results - we
will make an extra work\send.
--
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]