Author: wyoung
Date: Fri Dec  7 23:37:23 2007
New Revision: 1981

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1981&view=rev
Log:
Expanded sql_cmp(const string&, const string&) in custom.pl to support
mysqlpp::String, Date, DateTime, and Time types as well.  This allows
these additional types to also serve as compare-on field types in an
SSQLS.

Modified:
    trunk/lib/custom.pl

Modified: trunk/lib/custom.pl
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/custom.pl?rev=1981&r1=1980&r2=1981&view=diff
==============================================================================
--- trunk/lib/custom.pl (original)
+++ trunk/lib/custom.pl Fri Dec  7 23:37:23 2007
@@ -81,18 +81,19 @@
        $suppress_statics_end = ')';
 }
 
-print OUT0 << "---";
-namespace mysqlpp {
-
-enum sql_dummy_type { sql_dummy };
-
-inline int sql_cmp(const std::string &a, const std::string &b)
+my @types = ("mysqlpp::Date", "mysqlpp::DateTime",
+               "mysqlpp::Time", "mysqlpp::String", "std::string");
+foreach my $type (@types) {
+    print OUT0 << "---";
+
+inline int sql_cmp(const $type& a, const $type& b)
 {
        return a.compare(b);
 }
 ---
-
-my @types = ("char", "unsigned char", "sql_tinyint", "int", "unsigned int",
+}
+
[EMAIL PROTECTED] = ("char", "unsigned char", "sql_tinyint", "int", "unsigned 
int",
          "short int", "unsigned short int", "unsigned long", "long");
 foreach my $type (@types) {
     print OUT0 << "---";


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

Reply via email to