You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by cb...@apache.org on 2005/05/14 08:18:09 UTC

svn commit: r170127 - in /incubator/ibatis/trunk/java/mapper/mapper2: doc/release.txt src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java

Author: cbegin
Date: Fri May 13 23:18:07 2005
New Revision: 170127

URL: http://svn.apache.org/viewcvs?rev=170127&view=rev
Log: (empty)

Modified:
    incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt
    incubator/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java

Modified: incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=170127&r1=170126&r2=170127&view=diff
==============================================================================
--- incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt (original)
+++ incubator/ibatis/trunk/java/mapper/mapper2/doc/release.txt Fri May 13 23:18:07 2005
@@ -11,6 +11,8 @@
  o Fixed IBATIS-79 Problem with nested groupBy resultMaps
  o Fixed bug that prevented dynamic tags from being nested inside an iterate tag
  o Fixed bug that will now allow for the $[]$ notation to be used.
+ o Changed SQL executor to always call .execute instead of .executeQuery and .executeUpdate
+ 
 ------------------------------
  2.0.9B - Feb 20, 2004
 ------------------------------

Modified: incubator/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=170127&r1=170126&r2=170127&view=diff
==============================================================================
--- incubator/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original)
+++ incubator/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Fri May 13 23:18:07 2005
@@ -80,8 +80,11 @@
       request.getParameterMap().setParameters(request, ps, parameters);
 
       errorContext.setMoreInfo("Check the statement (update failed).");
-      rows = ps.executeUpdate();
-    } finally {
+
+      ps.execute();
+      rows = ps.getUpdateCount();
+    }
+    finally {
       closeStatement(ps);
     }
 
@@ -173,7 +176,9 @@
       request.getParameterMap().setParameters(request, ps, parameters);
 
       errorContext.setMoreInfo("Check the statement (query failed).");
-      rs = ps.executeQuery();
+
+      ps.execute();
+      rs = ps.getResultSet();
 
       errorContext.setMoreInfo("Check the results (failed to retrieve results).");
       handleResults(request, rs, skipResults, maxResults, callback);
@@ -227,7 +232,9 @@
       parameterMap.setParameters(request, cs, parameters);
 
       errorContext.setMoreInfo("Check the statement (update procedure failed).");
-      rows = cs.executeUpdate();
+
+      cs.execute();
+      rows = cs.getUpdateCount();
 
       errorContext.setMoreInfo("Check the output parameters (retrieval of output parameters failed).");
       retrieveOutputParameters(cs, mappings, parameters);
@@ -276,7 +283,9 @@
       parameterMap.setParameters(request, cs, parameters);
 
       errorContext.setMoreInfo("Check the statement (update procedure failed).");
-      rs = cs.executeQuery();
+
+      cs.execute();
+      rs = cs.getResultSet();
 
       errorContext.setMoreInfo("Check the results (failed to retrieve results).");
       handleResults(request, rs, skipResults, maxResults, callback);