Author: wyoung
Date: Wed Nov 28 02:49:03 2007
New Revision: 1887
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1887&view=rev
Log:
Many methods in ResUse's public interface had two overloads, one const
returning const, and another non-const. Removed all of the latter, with
no changes required outside ResUse and no effect on the test suite
results! Almost certainly not needed, therefore; we can replace them on
an as-needed basis during the beta.
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=1887&r1=1886&r2=1887&view=diff
==============================================================================
--- trunk/lib/result.cpp (original)
+++ trunk/lib/result.cpp Wed Nov 28 02:49:03 2007
@@ -101,16 +101,6 @@
}
-std::string&
-ResUse::field_name(int i)
-{
- if (!names_) {
- names_ = new FieldNames(this);
- }
- return names_->at(i);
-}
-
-
const std::string&
ResUse::field_name(int i) const
{
@@ -118,16 +108,6 @@
names_ = new FieldNames(this);
}
return names_->at(i);
-}
-
-
-RefCountedPointer<FieldNames>
-ResUse::field_names()
-{
- if (!names_) {
- names_ = new FieldNames(this);
- }
- return names_;
}
@@ -148,16 +128,6 @@
}
-mysql_type_info&
-ResUse::field_type(int i)
-{
- if (!types_) {
- types_ = new FieldTypes(this);
- }
- return (*types_)[i];
-}
-
-
const mysql_type_info&
ResUse::field_type(int i) const
{
@@ -165,16 +135,6 @@
types_ = new FieldTypes(this);
}
return (*types_)[i];
-}
-
-
-FieldTypes&
-ResUse::field_types()
-{
- if (!types_) {
- types_ = new FieldTypes(this);
- }
- return *types_;
}
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1887&r1=1886&r2=1887&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Wed Nov 28 02:49:03 2007
@@ -157,19 +157,8 @@
return result_;
}
- /// \brief Get the name of table that the result set comes from.
- std::string& table()
- {
- return table_;
- }
-
- /// \brief Return the name of the table
- ///
- /// This is only valid
- const std::string& table() const
- {
- return table_;
- }
+ /// \brief Return the name of the table the result set comes from
+ const std::string& table() const { return table_; }
/// \brief Get the index of the named field.
///
@@ -177,15 +166,7 @@
int field_num(const std::string&) const;
/// \brief Get the name of the field at the given index.
- ///
- /// This is the inverse of field_num().
- std::string& field_name(int);
-
- /// \brief Get the name of the field at the given index.
const std::string& field_name(int) const;
-
- /// \brief Get the names of the fields within this result set.
- RefCountedPointer<FieldNames> field_names();
/// \brief Get the names of the fields within this result set.
const RefCountedPointer<FieldNames> field_names() const;
@@ -195,14 +176,7 @@
void reset_field_names();
/// \brief Get the MySQL type for a field given its index.
- mysql_type_info& field_type(int i);
-
- /// \brief Get the MySQL type for a field given its index.
const mysql_type_info& field_type(int) const;
-
- /// \brief Get a list of the types of the fields within this
- /// result set.
- FieldTypes& field_types();
/// \brief Get a list of the types of the fields within this
/// result set.
@@ -215,13 +189,7 @@
int names(const std::string & s) const { return field_num(s); }
/// \brief Alias for field_name()
- std::string& names(int i) { return field_name(i); }
-
- /// \brief Alias for field_name()
const std::string& names(int i) const { return field_name(i); }
-
- /// \brief Alias for field_names()
- RefCountedPointer<FieldNames> names() { return field_names(); }
/// \brief Alias for field_names()
const RefCountedPointer<FieldNames> names() const
@@ -231,13 +199,7 @@
void reset_names() { reset_field_names(); }
/// \brief Alias for field_type()
- mysql_type_info& types(int i) { return field_type(i); }
-
- /// \brief Alias for field_type()
const mysql_type_info& types(int i) const { return field_type(i); }
-
- /// \brief Alias for field_types()
- FieldTypes& types() { return field_types(); }
/// \brief Alias for field_types()
const FieldTypes& types() const { return field_types(); }
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits