You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/03/09 10:28:02 UTC

[47/50] [abbrv] ignite git commit: JDBC getMoreResults() should not always throw SQLFeatureNotSupportedException

JDBC getMoreResults() should not always throw SQLFeatureNotSupportedException


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a5acf5d7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a5acf5d7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a5acf5d7

Branch: refs/heads/ignite-1786
Commit: a5acf5d71424c05d56d980442010310b480e0806
Parents: 79ae76c
Author: Valentin Kulichenko <va...@gmail.com>
Authored: Sun Mar 6 18:17:08 2016 -0800
Committer: Valentin Kulichenko <va...@gmail.com>
Committed: Sun Mar 6 18:17:08 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/jdbc/JdbcStatement.java | 9 ++++++---
 .../org/apache/ignite/internal/jdbc2/JdbcStatement.java     | 7 +++++--
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a5acf5d7/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java
index 0f4e08c..915c25b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/JdbcStatement.java
@@ -239,7 +239,7 @@ public class JdbcStatement implements Statement {
     @Override public boolean getMoreResults() throws SQLException {
         ensureNotClosed();
 
-        throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -320,7 +320,10 @@ public class JdbcStatement implements Statement {
     @Override public boolean getMoreResults(int curr) throws SQLException {
         ensureNotClosed();
 
-        throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+        if (curr == KEEP_CURRENT_RESULT || curr == CLOSE_ALL_RESULTS)
+            throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -458,4 +461,4 @@ public class JdbcStatement implements Statement {
         if (closed)
             throw new SQLException("Statement is closed.");
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/a5acf5d7/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
index f4a3e1d..6b806f3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcStatement.java
@@ -249,7 +249,7 @@ public class JdbcStatement implements Statement {
     @Override public boolean getMoreResults() throws SQLException {
         ensureNotClosed();
 
-        throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+        return false;
     }
 
     /** {@inheritDoc} */
@@ -330,7 +330,10 @@ public class JdbcStatement implements Statement {
     @Override public boolean getMoreResults(int curr) throws SQLException {
         ensureNotClosed();
 
-        throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+        if (curr == KEEP_CURRENT_RESULT || curr == CLOSE_ALL_RESULTS)
+            throw new SQLFeatureNotSupportedException("Multiple open results are not supported.");
+
+        return false;
     }
 
     /** {@inheritDoc} */