diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-25 21:39:24 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-25 21:39:24 +0100 |
commit | 692a2ff996cf34fc570b1804da8b37fd8157497c (patch) | |
tree | 9f1c9ad025a2a46a78e2d36fe2fee747dd63d871 /project2/sql/rdbmsDataSource.cpp | |
parent | SQLite mocking and tests from Project2 (diff) | |
download | project2-692a2ff996cf34fc570b1804da8b37fd8157497c.tar.bz2 project2-692a2ff996cf34fc570b1804da8b37fd8157497c.tar.xz project2-692a2ff996cf34fc570b1804da8b37fd8157497c.zip |
Use system dbpp and autoloaded connectors.
Breaks and disables Project2 mock datasources
Diffstat (limited to 'project2/sql/rdbmsDataSource.cpp')
-rw-r--r-- | project2/sql/rdbmsDataSource.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/project2/sql/rdbmsDataSource.cpp b/project2/sql/rdbmsDataSource.cpp index b0989b9..1e2778b 100644 --- a/project2/sql/rdbmsDataSource.cpp +++ b/project2/sql/rdbmsDataSource.cpp @@ -1,12 +1,10 @@ #include <pch.hpp> #include "rdbmsDataSource.h" -#include "connectionLoader.h" #include <sys/utsname.h> #include "logger.h" #include "scripts.h" #include <errno.h> -SimpleMessageException(UnknownConnectionProvider); #define LOCK(l) std::lock_guard<std::mutex> _lock##l(l) /// Specialized ElementLoader for instances of RdbmsDataSource; handles persistent DB connections @@ -246,14 +244,14 @@ RdbmsDataSource::RdbmsConnection::isExpired() const RdbmsDataSource::ConnectionInfo::ConnectionInfo(ScriptNodePtr node) : dsn(node->value("dsn", NULL).as<std::string>()), - typeId(InstanceMap<ConnectionLoader, std::string>::Get<UnknownConnectionProvider>(node->value("provider", NULL))) + typeId(node->value("provider", NULL).as<std::string>()) { } DB::Connection * RdbmsDataSource::ConnectionInfo::connect() const { - return typeId->create(dsn); + return DB::ConnectionFactory::create(typeId, dsn); } bool |