zstan commented on code in PR #2906:
URL: https://github.com/apache/ignite-3/pull/2906#discussion_r1415625013
##########
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:
I misunderstand here, if you suggest to call fetchAsync inside of
getMoreResultsAsync then we obtain blocking code, otherwise i miss your
suggestion, can you show where i can obtain first page results plz ?
--
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]