summaryrefslogtreecommitdiffstats
path: root/store/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'store/database.h')
-rw-r--r--store/database.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/store/database.h b/store/database.h
new file mode 100644
index 0000000..b42b9f7
--- /dev/null
+++ b/store/database.h
@@ -0,0 +1,16 @@
1#include <lmdb.h>
2#include <string>
3
4class Database {
5public:
6 Database();
7 ~Database();
8 MDB_txn *startTransaction();
9 void endTransaction(MDB_txn *transaction);
10 void write(const std::string &sKey, const std::string &sValue, MDB_txn *transaction);
11 void read(const std::string &sKey);
12
13private:
14 MDB_env *env;
15 MDB_dbi dbi;
16};