summaryrefslogtreecommitdiff
path: root/server/src/database.h
diff options
context:
space:
mode:
authordeva <deva>2008-05-26 09:26:54 +0000
committerdeva <deva>2008-05-26 09:26:54 +0000
commitb0be417b31e2d2577c188a563d531889354b7617 (patch)
tree99412123ad5049fd013fa4e1e4adfa3975d57d49 /server/src/database.h
parent158915fafe286df69a68374032187ae283eb4ded (diff)
Added support for ttl on queries. Some other fies on the query.
Diffstat (limited to 'server/src/database.h')
-rw-r--r--server/src/database.h9
1 files changed, 7 insertions, 2 deletions
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 <map>
-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);