From 0fb668f3fb1df49df1482f7aa64c8b02816f4f72 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sun, 18 Nov 2012 19:13:16 +0000 Subject: Add a basic MySQL connector, not fully functional, but will suffice for p2tv --- project2/Jamfile.jam | 1 + project2/sql/Jamfile.jam | 12 ++++++++++++ project2/sql/sql-modMySQL.cpp | 4 ++++ 3 files changed, 17 insertions(+) create mode 100644 project2/sql/sql-modMySQL.cpp 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 : : : : 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 : : : : "`pkg-config --cflags glibmm-2.4`" "`pkg-config --libs glibmm-2.4`" ; +explicit object sql-modMySQL ; +obj sql-modMySQL : + sql-modMySQL.cpp : + ../../libmysqlpp//mysqlpp + glibmm + ../../libmisc + ../common + : : + ../../libmysqlpp//mysqlpp + ; + explicit object sql-modODBC ; obj sql-modODBC : sql-modODBC.cpp : @@ -37,6 +48,7 @@ lib p2sql : : yes:sql-modODBC yes:sql-modPQ + yes:sql-modMySQL glibmm ../common//p2common ../../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) -- cgit v1.2.3