From f54ba741f5941575c9fe38849bd243c161f9b12a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 26 Sep 2015 00:58:11 +0100 Subject: Restore mock database support --- project2/project2-1.2_beta2.tar | 0 project2/sql/Jamfile.jam | 2 +- project2/sql/mockDatasource.cpp | 6 +++--- project2/sql/mockDatasource.h | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 project2/project2-1.2_beta2.tar diff --git a/project2/project2-1.2_beta2.tar b/project2/project2-1.2_beta2.tar new file mode 100644 index 0000000..e69de29 diff --git a/project2/sql/Jamfile.jam b/project2/sql/Jamfile.jam index 004b0b5..2affda0 100644 --- a/project2/sql/Jamfile.jam +++ b/project2/sql/Jamfile.jam @@ -15,7 +15,7 @@ cpp-pch pch : pch.hpp : lib p2sql : pch - [ glob *.cpp : mockDatasource.cpp ] + [ glob *.cpp ] : . dbppcore diff --git a/project2/sql/mockDatasource.cpp b/project2/sql/mockDatasource.cpp index 5beb963..9f21e44 100644 --- a/project2/sql/mockDatasource.cpp +++ b/project2/sql/mockDatasource.cpp @@ -1,11 +1,11 @@ #include "mockDatasource.h" #include -#include +#include -NAMEDFACTORY("mock", MockDatabase, DB::ConnectionFactory); +NAMEDPLUGIN("mock", MockConnectionFactory, DB::ConnectionFactory); DB::Connection * -MockConnectionLoader::create(const std::string & n) const +MockConnectionFactory::create(const std::string & n) const { return DB::MockDatabase::openConnectionTo(n); } diff --git a/project2/sql/mockDatasource.h b/project2/sql/mockDatasource.h index ed58027..e9a9732 100644 --- a/project2/sql/mockDatasource.h +++ b/project2/sql/mockDatasource.h @@ -1,10 +1,9 @@ #ifndef MOCKDATASOURCE_H #define MOCKDATASOURCE_H -#include -#include "mockDatabase.h" +#include -class MockConnectionLoader : public ConnectionLoader { +class MockConnectionFactory : public DB::ConnectionFactory { public: DB::Connection * create(const std::string &) const; }; -- cgit v1.2.3