Author: wyoung
Date: Mon Dec 3 14:39:36 2007
New Revision: 1967
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1967&view=rev
Log:
A few fixes to previous ResUse de-MySQLization.
Modified:
trunk/lib/dbdriver.h
trunk/lib/result.cpp
trunk/lib/result.h
Modified: trunk/lib/dbdriver.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/dbdriver.h?rev=1967&r1=1966&r2=1967&view=diff
==============================================================================
--- trunk/lib/dbdriver.h (original)
+++ trunk/lib/dbdriver.h Mon Dec 3 14:39:36 2007
@@ -213,7 +213,7 @@
/// \brief Jumps to the given field within the result set
///
/// Wraps \c mysql_field_seek() in MySQL C API.
- void field_seek(MYSQL_RES* res, int field) const
+ void field_seek(MYSQL_RES* res, size_t field) const
{ mysql_field_seek(res, field); }
/// \brief Return the connection options object
Modified: trunk/lib/result.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.cpp?rev=1967&r1=1966&r2=1967&view=diff
==============================================================================
--- trunk/lib/result.cpp (original)
+++ trunk/lib/result.cpp Mon Dec 3 14:39:36 2007
@@ -76,6 +76,13 @@
}
+const Field&
+ResUse::fetch_field() const
+{
+ return *driver_->fetch_field(result_.raw());
+}
+
+
const unsigned long*
ResUse::fetch_lengths() const
{
@@ -124,6 +131,13 @@
}
+void
+ResUse::field_seek(size_t field) const
+{
+ driver_->field_seek(result_.raw(), field);
+}
+
+
int
ResUse::num_fields() const
{
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1967&r1=1966&r2=1967&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Mon Dec 3 14:39:36 2007
@@ -97,6 +97,9 @@
/// \brief Copy another ResUse object's data into this object
ResUse& operator =(const ResUse& other);
+ /// \brief Returns the next field in this result set
+ const Field& fetch_field() const;
+
/// \brief Returns the lengths of the fields in the current row of
/// the result set.
///
@@ -124,6 +127,11 @@
/// to implement higher-level query types on top of raw "use"
/// queries. Query::storein() uses it, for example.
MYSQL_ROW fetch_raw_row() const;
+
+ /// \brief Jumps to the given field within the result set
+ ///
+ /// Wraps \c mysql_field_seek() in MySQL C API.
+ void field_seek(size_t field) const;
/// \brief Returns the number of fields in this result set
int num_fields() const;
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits