summaryrefslogtreecommitdiff
path: root/server/src/database.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/database.cc')
-rw-r--r--server/src/database.cc5
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()