Date: Wednesday, February 1, 2006 @ 11:30:56
  Author: gilles
    Path: /cvsroot/carob/carob

Modified: include/Statement.hpp (1.30 -> 1.31) src/Statement.cpp (1.26 ->
          1.27)

close() now deletes all results by calling cleanUpResults
Completed javadoc and commented code about multiple resultSet non-close


-----------------------+
 include/Statement.hpp |    3 ++-
 src/Statement.cpp     |    7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)


Index: carob/include/Statement.hpp
diff -u carob/include/Statement.hpp:1.30 carob/include/Statement.hpp:1.31
--- carob/include/Statement.hpp:1.30    Mon Jan 30 15:47:59 2006
+++ carob/include/Statement.hpp Wed Feb  1 11:30:56 2006
@@ -306,7 +306,8 @@
   void                    setEscapeProcessing(bool enable)
                               { escapeProcessing = enable; }
   /**
-   * In many cases, it is desirable to immediately release a Statement's
+   * Remotely closes the current ResultSet if applicable and frees result
+   * memory. In many cases, it is desirable to immediately release a 
Statement's
    * database and JDBC resources instead of waiting for this to happen when it
    * is automatically closed. The close method provides this immediate release.
    * <p>
Index: carob/src/Statement.cpp
diff -u carob/src/Statement.cpp:1.26 carob/src/Statement.cpp:1.27
--- carob/src/Statement.cpp:1.26        Tue Jan 24 19:37:27 2006
+++ carob/src/Statement.cpp     Wed Feb  1 11:30:56 2006
@@ -268,16 +268,19 @@
 
 void Statement::close()
 {
-  // Force the ResultSet to close
+  // Force the current ResultSet to close
+  // For multiple resultsets, streaming is forbidden, so we don't have to
+  // remotely close() them
   if (lastResultPtr != NULL)
   {
     try
     {
       lastResultPtr->close();
-      lastResultPtr = NULL;
     }
     catch (...) {} //ignore
   }
+  // free mem
+  cleanUpResults();
 }
 
 ResultSetMetaData* Statement::getMetaData() throw (SocketIOException,

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to