summaryrefslogtreecommitdiff
path: root/server/src/queryhandlerpracro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/queryhandlerpracro.cc')
-rw-r--r--server/src/queryhandlerpracro.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/queryhandlerpracro.cc b/server/src/queryhandlerpracro.cc
index 3dd5b52..ab1466e 100644
--- a/server/src/queryhandlerpracro.cc
+++ b/server/src/queryhandlerpracro.cc
@@ -60,3 +60,24 @@ QueryResult QueryHandlerPracro::exec(Query &query)
return result;
}
+
+#ifdef TEST_QUERYHANDLERPRACRO
+
+#include "configuration.h"
+
+int main()
+{
+ Database db("pgsql", Conf::database_addr, "", Conf::database_user, Conf::database_passwd, "");
+
+ QueryHandlerPracro qh(&db, "2003791613");
+
+ Query q1;
+ q1.attributes["device_id"] = "lensmeter";
+ q1.attributes["device_type"] = "lensmeter";
+ QueryResult res = qh.exec(q1);
+ res.print();
+
+ return 0;
+}
+
+#endif/*TEST_QUERYHANDLERPRACRO*/