You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/11/18 10:02:44 UTC

[GitHub] [incubator-shardingsphere] gfreezy commented on a change in pull request #3547: `getResultSet` should return null after `executeUpdate`

gfreezy commented on a change in pull request #3547: `getResultSet` should return null after `executeUpdate`
URL: https://github.com/apache/incubator-shardingsphere/pull/3547#discussion_r347289469
 
 

 ##########
 File path: sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShardingPreparedStatement.java
 ##########
 @@ -133,7 +133,19 @@ public ResultSet getResultSet() throws SQLException {
         for (Statement each : preparedStatementExecutor.getStatements()) {
             ResultSet resultSet = each.getResultSet();
             resultSets.add(resultSet);
-            queryResults.add(new StreamQueryResult(resultSet, connection.getRuntimeContext().getRule(), connection.getRuntimeContext().getProps(), sqlRouteResult.getSqlStatementContext()));
+            if (resultSet != null) {
+                queryResults.add(new StreamQueryResult(resultSet, connection.getRuntimeContext().getRule(), connection.getRuntimeContext().getProps(), sqlRouteResult.getSqlStatementContext()));
+            }
+        }
+        boolean allResultSetAreNull = true;
 
 Review comment:
   可以用 stream 吗?sharding-jdbc 最低支持 java 什么版本?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services