Author: wyoung
Date: Tue Jun 26 04:54:19 2007
New Revision: 1614

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1614&view=rev
Log:
Removed dependency of sql_types.h on myset.h and (indirectly)
datetime.h.  Now we only define sql_* typedef aliases for those MySQL++
types if the headers are included before sql_types.h.

Modified:
    trunk/lib/sql_types.h
    trunk/lib/type_info.cpp

Modified: trunk/lib/sql_types.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/sql_types.h?rev=1614&r1=1613&r2=1614&view=diff
==============================================================================
--- trunk/lib/sql_types.h (original)
+++ trunk/lib/sql_types.h Tue Jun 26 04:54:19 2007
@@ -28,7 +28,6 @@
 #define MYSQLPP_SQL_TYPES_H
 
 #include "common.h"
-#include "myset.h"
 
 #include <string>
 
@@ -55,14 +54,7 @@
 typedef double                 sql_double;
 typedef double                 sql_decimal;
 
-typedef Date                   sql_date;
-typedef Time                   sql_time;
-typedef Time                   sql_timestamp;
-typedef DateTime               sql_datetime;
-
 typedef std::string            sql_enum;
-
-typedef Set<>                  sql_set;
 
 typedef std::string            sql_blob;
 typedef std::string            sql_tinyblob;
@@ -72,6 +64,19 @@
 typedef std::string            sql_char;
 typedef std::string            sql_varchar;
 
+#ifdef MYSQLPP_DATETIME_H
+    // MySQL++ date and time types are defined, so make aliases for
+    // them matching the style of the above types.
+    typedef Date               sql_date;
+    typedef Time               sql_time;
+    typedef Time               sql_timestamp;
+    typedef DateTime   sql_datetime;
+#endif
+#ifdef MYSQLPP_MYSET_H
+    // Ditto for MySQL++'s SQL set type
+    typedef Set<>              sql_set;
+#endif
+
 #endif // !defined(DOXYGEN_IGNORE)
 
 } // end namespace mysqlpp

Modified: trunk/lib/type_info.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/type_info.cpp?rev=1614&r1=1613&r2=1614&view=diff
==============================================================================
--- trunk/lib/type_info.cpp (original)
+++ trunk/lib/type_info.cpp Tue Jun 26 04:54:19 2007
@@ -25,10 +25,11 @@
 ***********************************************************************/
 
 #include "common.h"
+#include "type_info.h"
 
 #include "datetime.h"
+#include "myset.h"
 #include "sql_types.h"
-#include "type_info.h"
 
 #include <mysql.h>
 


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

Reply via email to