Author: wyoung
Date: Wed Nov 28 03:17:07 2007
New Revision: 1892
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1892&view=rev
Log:
Renamed ResUse::fields(unsigned int) to field(unsigned int). fields()
returns Fields, so the function that returns Field should be field().
(Similar to "grammar" fixes in previous checkin, but nothing is removed
in this one, so it's a separate issue. Also, it affects code outside
ResUse itself including one example, so it's more likely to affect end
user code.)
Modified:
trunk/examples/multiquery.cpp
trunk/lib/field_types.cpp
trunk/lib/result.cpp
trunk/lib/result.h
Modified: trunk/examples/multiquery.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/multiquery.cpp?rev=1892&r1=1891&r2=1892&view=diff
==============================================================================
--- trunk/examples/multiquery.cpp (original)
+++ trunk/examples/multiquery.cpp Wed Nov 28 03:17:07 2007
@@ -96,7 +96,7 @@
IntVectorType widths;
int size = res.num_fields();
for (int i = 0; i < size; i++) {
- mysql_type_info mti(res.fields(i));
+ mysql_type_info mti(res.field(i));
widths.push_back((res.field_name(i).size() > mti.max_length()) ?
res.field_name(i).size() : mti.max_length());
}
Modified: trunk/lib/field_types.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_types.cpp?rev=1892&r1=1891&r2=1892&view=diff
==============================================================================
--- trunk/lib/field_types.cpp (original)
+++ trunk/lib/field_types.cpp Wed Nov 28 03:17:07 2007
@@ -38,7 +38,7 @@
int num = res->num_fields();
reserve(num);
for (int i = 0; i < num; i++) {
- push_back(res->fields(i));
+ push_back(res->field(i));
}
}
Modified: trunk/lib/result.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.cpp?rev=1892&r1=1891&r2=1892&view=diff
==============================================================================
--- trunk/lib/result.cpp (original)
+++ trunk/lib/result.cpp Wed Nov 28 03:17:07 2007
@@ -39,7 +39,7 @@
if (names_) {
types_ = new FieldTypes(this);
}
- table_ = fields(0).table;
+ table_ = field(0).table;
initialized_ = true;
}
}
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1892&r1=1891&r2=1892&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Wed Nov 28 03:17:07 2007
@@ -190,7 +190,7 @@
const Fields& fields() const { return fields_; }
/// \brief Get the underlying Field structure given its index.
- const Field& fields(unsigned int i) const { return fields_.at(i); }
+ const Field& field(unsigned int i) const { return fields_.at(i); }
/// \brief Returns true if the other ResUse object shares the same
/// underlying C API result set as this one.
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits