diff options
author | deva <deva> | 2009-08-07 11:27:18 +0000 |
---|---|---|
committer | deva <deva> | 2009-08-07 11:27:18 +0000 |
commit | d35bafeec39b6688a8dd07c51ea304e348b10fa2 (patch) | |
tree | b615a7e28f5927841feb92d0b3c2da7f6c9feafa /server/src/database.cc | |
parent | feed25360fe7b71d2ebdb523673d667e79123236 (diff) |
Added new testdb, that can be activated through the cli (-d testdb) or through the config file (database_backend = testdb) .
Diffstat (limited to 'server/src/database.cc')
-rw-r--r-- | server/src/database.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/database.cc b/server/src/database.cc index 5a03126..9a4905b 100644 --- a/server/src/database.cc +++ b/server/src/database.cc @@ -32,6 +32,7 @@ #include "debug.h" #include "pracrodaopgsql.h" +#include "pracrodaotest.h" Database::Database(std::string _backend, std::string _host, std::string _port, std::string _user, std::string _passwd, std::string _dbname) { @@ -42,6 +43,10 @@ Database::Database(std::string _backend, std::string _host, std::string _port, s dao = new PracroDAOPgsql(_host, _port, _user, _passwd, _dbname); } #endif/*WITHOUT_DB*/ + if(_backend == "testdb") { + Data data; + dao = new PracroDAOTest(data, true); + } } Database::~Database() |