diff options
author | randomdan <randomdan@localhost> | 2012-11-18 19:13:16 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2012-11-18 19:13:16 +0000 |
commit | 5faf875d79779b6e154c5b657423f136c78410dd (patch) | |
tree | 3467717216ba05e32b412e674346119d1d0f4e12 | |
parent | Fix creation of default error XML document style (diff) | |
download | project2-5faf875d79779b6e154c5b657423f136c78410dd.tar.bz2 project2-5faf875d79779b6e154c5b657423f136c78410dd.tar.xz project2-5faf875d79779b6e154c5b657423f136c78410dd.zip |
Add a basic MySQL connector, not fully functional, but will suffice for p2tv
-rw-r--r-- | project2/Jamfile.jam | 1 | ||||
-rw-r--r-- | project2/sql/Jamfile.jam | 12 | ||||
-rw-r--r-- | project2/sql/sql-modMySQL.cpp | 4 |
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) |