From b0be417b31e2d2577c188a563d531889354b7617 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 26 May 2008 09:26:54 +0000 Subject: Added support for ttl on queries. Some other fies on the query. --- server/src/database.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'server/src/database.h') diff --git a/server/src/database.h b/server/src/database.h index 51c0f1a..0958b15 100644 --- a/server/src/database.h +++ b/server/src/database.h @@ -36,7 +36,12 @@ #include -typedef std::map< std::string, std::string > Fields; +class Value { +public: + std::string value; + time_t timestamp; +}; +typedef std::map< std::string, Value > Values; class Database { public: @@ -53,7 +58,7 @@ public: time_t now = time(NULL)); // Get a list of values from the db - Fields getValues(std::string cpr, + Values getValues(std::string cpr, std::vector< std::string > &fieldnames, time_t oldest = 0); -- cgit v1.2.3