summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-11-18 19:13:16 +0000
committerrandomdan <randomdan@localhost>2012-11-18 19:13:16 +0000
commit0fb668f3fb1df49df1482f7aa64c8b02816f4f72 (patch)
tree3467717216ba05e32b412e674346119d1d0f4e12
parentFix creation of default error XML document style (diff)
downloadproject2-0fb668f3fb1df49df1482f7aa64c8b02816f4f72.tar.bz2
project2-0fb668f3fb1df49df1482f7aa64c8b02816f4f72.tar.xz
project2-0fb668f3fb1df49df1482f7aa64c8b02816f4f72.zip
Add a basic MySQL connector, not fully functional, but will suffice for p2tv
-rw-r--r--project2/Jamfile.jam1
-rw-r--r--project2/sql/Jamfile.jam12
-rw-r--r--project2/sql/sql-modMySQL.cpp4
3 files changed, 17 insertions, 0 deletions
diff --git a/project2/Jamfile.jam b/project2/Jamfile.jam
index 4eba894..ed25f40 100644
--- a/project2/Jamfile.jam
+++ b/project2/Jamfile.jam
@@ -4,6 +4,7 @@ import feature : feature ;
feature uuid : boost ossp : propagated ;
feature odbc : yes no : propagated ;
feature pq : yes no : propagated ;
+feature mysql : yes no : propagated ;
alias p2parts : : : :
<library>url//p2url
diff --git a/project2/sql/Jamfile.jam b/project2/sql/Jamfile.jam
index cd6b6a5..f73fd65 100644
--- a/project2/sql/Jamfile.jam
+++ b/project2/sql/Jamfile.jam
@@ -2,6 +2,17 @@ alias glibmm : : : :
<cflags>"`pkg-config --cflags glibmm-2.4`"
<linkflags>"`pkg-config --libs glibmm-2.4`"
;
+explicit object sql-modMySQL ;
+obj sql-modMySQL :
+ sql-modMySQL.cpp :
+ <library>../../libmysqlpp//mysqlpp
+ <library>glibmm
+ <include>../../libmisc
+ <include>../common
+ : :
+ <library>../../libmysqlpp//mysqlpp
+ ;
+
explicit object sql-modODBC ;
obj sql-modODBC :
sql-modODBC.cpp :
@@ -37,6 +48,7 @@ lib p2sql :
:
<odbc>yes:<library>sql-modODBC
<pq>yes:<library>sql-modPQ
+ <mysql>yes:<library>sql-modMySQL
<library>glibmm
<library>../common//p2common
<include>../../libmisc
diff --git a/project2/sql/sql-modMySQL.cpp b/project2/sql/sql-modMySQL.cpp
new file mode 100644
index 0000000..9ca12c0
--- /dev/null
+++ b/project2/sql/sql-modMySQL.cpp
@@ -0,0 +1,4 @@
+#include "connectionLoader.h"
+#include "../libmysqlpp/connection.h"
+typedef MySQL::Connection MySQLConnection;
+DECLARE_GENERIC_LOADER("mysql", ConnectionLoader, MySQLConnection)