diff options
author | deva <deva> | 2009-07-22 15:00:29 +0000 |
---|---|---|
committer | deva <deva> | 2009-07-22 15:00:29 +0000 |
commit | 7e349e2789a633a6014baea63aeb7932e024c917 (patch) | |
tree | 0b7b20adf693e3991f4410368255fd05aa8aab0d /server/src/queryhandlerpracro.cc | |
parent | 8109ada79a24f03e00ebc199ebfdb58e70b054d9 (diff) |
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.
Diffstat (limited to 'server/src/queryhandlerpracro.cc')
-rw-r--r-- | server/src/queryhandlerpracro.cc | 21 |
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*/ |