Author: wyoung
Date: Tue May 18 03:34:39 2010
New Revision: 2638
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2638&view=rev
Log:
Added FieldNames::operator[](size_type) overloads -- existing overloads
take int -- to force lookups to go through our other vector overrides
for all uses. Without this, SSQLS population is case-sensitive even
though we smash string case in existing code, because the code paths
exercised by SSQLS end up calling the vector base class versions which
don't know about case insensitivity.
Modified:
trunk/Wishlist
trunk/lib/field_names.h
Modified: trunk/Wishlist
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=2638&r1=2637&r2=2638&view=diff
==============================================================================
--- trunk/Wishlist (original)
+++ trunk/Wishlist Tue May 18 03:34:39 2010
@@ -21,15 +21,6 @@
Would be nice to get MYSQL_WIN_DIR support, and to make it
link against the built MySQL++ instead of requiring it to be
installed first.
-
- o Result::field_num() should be case-insensitive; column names
- aren't case-sensitive in SQL. MySQL++ is currently trying to
- do this by smashing field name case to lowercase in FieldNames,
- calling str_to_lwr() on all received values. This doesn't help
- with SSQLS because it's not smashing field name case we get
- as macro arguments in the SSQLS definition. Probably better
- all around to remove the case smashing and do case-insensitive
- comparisons instead.
o Raise tquery and SSQLS field limits in RPM build process, since
the very fact that you're building an RPM means we know the
Modified: trunk/lib/field_names.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.h?rev=2638&r1=2637&r2=2638&view=diff
==============================================================================
--- trunk/lib/field_names.h (original)
+++ trunk/lib/field_names.h Tue May 18 03:34:39 2010
@@ -93,6 +93,19 @@
return at(i);
}
+ /// \brief Get the name of a field given its index.
+ std::string& operator [](size_type i)
+ {
+ return at(i);
+ }
+
+ /// \brief Get the name of a field given its index, in const
+ /// context.
+ const std::string& operator [](size_type i) const
+ {
+ return at(i);
+ }
+
/// \brief Get the index number of a field given its name
unsigned int operator [](const std::string& s) const;
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits