Author: mysqlpp
Date: Sun Dec  2 08:08:36 2007
New Revision: 1938

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1938&view=rev
Log:
Un-inlined several Query member functions that referenced Connection
methods to break the dependency.  This is how it was supposed to be, but
we previously got access to Connection by way of exceptions.h which
#included connection.h, but won't any more in the near future.

Modified:
    trunk/lib/query.cpp
    trunk/lib/query.h

Modified: trunk/lib/query.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.cpp?rev=1938&r1=1937&r2=1938&view=diff
==============================================================================
--- trunk/lib/query.cpp (original)
+++ trunk/lib/query.cpp Sun Dec  2 08:08:36 2007
@@ -76,11 +76,30 @@
        return *this;
 }
 
+Query::operator private_bool_type() const
+{
+       return *conn_ && copacetic_ ? &Query::copacetic_ : 0;
+}
+
 
 my_ulonglong
 Query::affected_rows() const
 {
        return conn_->affected_rows();
+}
+
+
+int
+Query::errnum() const
+{
+       return conn_->errnum();
+}
+
+
+const char* 
+Query::error() const
+{
+       return conn_->error();
 }
 
 

Modified: trunk/lib/query.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.h?rev=1938&r1=1937&r2=1938&view=diff
==============================================================================
--- trunk/lib/query.h (original)
+++ trunk/lib/query.h Sun Dec  2 08:08:36 2007
@@ -171,10 +171,7 @@
        /// This method returns false if either the Query object or its
        /// associated Connection object has seen an error condition since
        /// the last operation.
-       operator private_bool_type() const
-       {
-               return *conn_ && copacetic_ ? &Query::copacetic_ : 0;
-       }
+       operator private_bool_type() const;
 
        /// \brief Return true if the object has experienced an error
        bool operator !() { return !copacetic_; }
@@ -242,13 +239,13 @@
        ///
        /// This just delegates to Connection::errnum().  Query has nothing
        /// extra to say, so use either, as makes sense in your program.
-       int errnum() const { return conn_->errnum(); }
+       int errnum() const;
 
        /// \brief Get the last error message that was set.
        ///
        /// This just delegates to Connection::error().  Query has nothing
        /// extra to say, so use either, as makes sense in your program.
-       const char* error() const { return conn_->error(); }
+       const char* error() const;
 
        /// \brief Treat the contents of the query string as a template
        /// query.


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

Reply via email to