Author: wyoung
Date: Sat Aug 11 00:06:56 2007
New Revision: 1747

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1747&view=rev
Log:
Result and ResUse both had virtually identical fetch_row() methods.  The
former derives from the latter, so this was pretty pointless.  Fixed up
the minor differences so the one in the parent class can serve both
masters.

Modified:
    trunk/Wishlist
    trunk/lib/result.h

Modified: trunk/Wishlist
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=1747&r1=1746&r2=1747&view=diff
==============================================================================
--- trunk/Wishlist (original)
+++ trunk/Wishlist Sat Aug 11 00:06:56 2007
@@ -80,9 +80,6 @@
       - If we can get reference semantics everywhere, we can add
         operator->() to subscript_iterator.  It can't work with
         value semantics.
-
-    o Sort out the ResUse::fetch_row() vs. Result::fetch_row() mess.
-      Probably ResUse can't really justify having this.
 
     o ColData and SQLString are inverses.  ColData is initialized
       with string data from SQL results and can convert it to typical

Modified: trunk/lib/result.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1747&r1=1746&r2=1747&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Sat Aug 11 00:06:56 2007
@@ -102,7 +102,7 @@
        ///
        /// This is not a thin wrapper. It does a lot of error checking before
        /// returning the mysqlpp::Row object containing the row data.
-       Row fetch_row()
+       Row fetch_row() const
        {
                if (!result_) {
                        if (throw_exceptions()) {
@@ -408,34 +408,6 @@
        /// \brief Destroy result set
        virtual ~Result() { }
 
-       /// \brief Wraps mysql_fetch_row() in MySQL C API.
-       ///
-       /// This is simply the const version of the same function in our
-       /// \link mysqlpp::ResUse parent class \endlink . Why this cannot
-       /// actually \e be in our parent class is beyond me.
-       const value_type fetch_row() const
-       {
-               if (!result_) {
-                       if (throw_exceptions()) {
-                               throw BadQuery("Results not fetched");
-                       }
-                       else {
-                               return Row();
-                       }
-               }
-               MYSQL_ROW row = mysql_fetch_row(result_);
-               unsigned long* length = mysql_fetch_lengths(result_);
-               if (!row || !length) {
-                       if (throw_exceptions()) {
-                               throw EndOfResults();
-                       }
-                       else {
-                               return Row();
-                       }
-               }
-               return Row(row, this, length, throw_exceptions());
-       }
-
        /// \brief Wraps mysql_num_rows() in MySQL C API.
        my_ulonglong num_rows() const
        {


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to