From 7e349e2789a633a6014baea63aeb7932e024c917 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 22 Jul 2009 15:00:29 +0000 Subject: Changed the way the macros are looked up in the filesystem (now they are parsed and indexed using version numbers). Updated all unit tests, to compile and run again. --- server/src/queryhandlerpracro.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'server/src/queryhandlerpracro.cc') 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*/ -- cgit v1.2.3