Author: wyoung
Date: Wed Nov 28 03:46:46 2007
New Revision: 1898
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1898&view=rev
Log:
- Removed ResUse::table_ data member: it was just a cached copy of data we
can get from elsewhere within data the object already keeps.
- Changed ResUse::table() to pull its return value from our Fields
object, which is where table_ previously got its initial value.
Modified:
trunk/lib/result.cpp
trunk/lib/result.h
Modified: trunk/lib/result.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.cpp?rev=1898&r1=1897&r2=1898&view=diff
==============================================================================
--- trunk/lib/result.cpp (original)
+++ trunk/lib/result.cpp Wed Nov 28 03:46:46 2007
@@ -39,7 +39,6 @@
if (names_) {
types_ = new FieldTypes(this);
}
- table_ = field(0).table;
initialized_ = true;
}
}
@@ -71,8 +70,6 @@
else {
types_ = 0;
}
-
- table_ = other.table_;
initialized_ = true;
}
@@ -153,8 +150,6 @@
delete types_;
types_ = 0;
-
- table_.erase();
}
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1898&r1=1897&r2=1898&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Wed Nov 28 03:46:46 2007
@@ -152,7 +152,8 @@
operator bool() const { return result_; }
/// \brief Return the name of the table the result set comes from
- const std::string& table() const { return table_; }
+ const char* table() const
+ { return fields_.size() > 0 ? fields_[0].table : ""; }
/// \brief Get the index of the named field.
///
@@ -196,7 +197,6 @@
bool initialized_; ///< if true, object is fully
initted
mutable FieldTypes* types_; ///< list of field types in result
Fields fields_; ///< list of fields in result
- std::string table_; ///< table result set comes from
/// \brief list of field names in result
mutable RefCountedPointer<FieldNames> names_;
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits