summaryrefslogtreecommitdiffstats
path: root/store/database.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2014-12-03 20:36:37 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2014-12-03 20:36:37 +0100
commit44757d932abac6c8346366dfa3c0fb94e5ee0d06 (patch)
treec9120c3b4faf1b8e33dc04fee7347bc91c956977 /store/database.h
parent21138cfb7a4537626e11bdf084fcf9d672361059 (diff)
downloadsink-44757d932abac6c8346366dfa3c0fb94e5ee0d06.tar.gz
sink-44757d932abac6c8346366dfa3c0fb94e5ee0d06.zip
dummyresource that doesn't work yet
Diffstat (limited to 'store/database.h')
-rw-r--r--store/database.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/store/database.h b/store/database.h
index 1a124be..999a89e 100644
--- a/store/database.h
+++ b/store/database.h
@@ -1,3 +1,5 @@
1#pragma once
2
1#include <lmdb.h> 3#include <lmdb.h>
2#include <string> 4#include <string>
3#include <QString> 5#include <QString>
@@ -9,7 +11,8 @@ public:
9 MDB_txn *startTransaction(); 11 MDB_txn *startTransaction();
10 void endTransaction(MDB_txn *transaction); 12 void endTransaction(MDB_txn *transaction);
11 void write(const std::string &sKey, const std::string &sValue, MDB_txn *transaction); 13 void write(const std::string &sKey, const std::string &sValue, MDB_txn *transaction);
12 void read(const std::string &sKey); 14 //Perhaps prefer iterators (assuming we need to be able to match multiple values
15 void read(const std::string &sKey, const std::function<void(const std::string)> &);
13 16
14private: 17private:
15 MDB_env *env; 18 MDB_env *env;