Author: wyoung
Date: Fri Jan 12 19:39:15 2007
New Revision: 1396

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1396&view=rev
Log:
Added Row::raw_string() function suggested by Yingbo Miao
<[EMAIL PROTECTED]>.  Same as raw_data(), but returns in C++ string form
instead of C string form.

Modified:
    trunk/lib/row.h

Modified: trunk/lib/row.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.h?rev=1396&r1=1395&r2=1396&view=diff
==============================================================================
--- trunk/lib/row.h (original)
+++ trunk/lib/row.h Fri Jan 12 19:39:15 2007
@@ -149,7 +149,8 @@
        /// See operator[](const char*) for more caveats.
        const ColData at(size_type i) const;
 
-       /// \brief Return the value of a field given its index, in raw form.
+       /// \brief Return the value of a field as a C string given its
+       /// index, in raw form.
        ///
        /// This is the same thing as operator[], except that the data isn't
        /// converted to a ColData object first.  Also, this method does not
@@ -157,6 +158,16 @@
        const char* raw_data(int i) const
        {
                return data_[i].data();
+       }
+
+       /// \brief Return the value of a field as a C++ string given its
+       /// index, in raw form.
+       ///
+       /// This is the same thing as operator[], except that the data isn't
+       /// converted to a ColData object first.
+       const std::string& raw_string(int i) const
+       {
+               return data_.at(i);
        }
 
        /// \brief Returns true if there is data in the row.


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

Reply via email to