From 64e82fe5ccfa10e1652c149d10e89b08a5aae165 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 22 Nov 2014 12:05:52 +0100 Subject: Buffertest + store --- store/database.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 store/database.h (limited to 'store/database.h') 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 @@ +#include +#include + +class Database { +public: + Database(); + ~Database(); + MDB_txn *startTransaction(); + void endTransaction(MDB_txn *transaction); + void write(const std::string &sKey, const std::string &sValue, MDB_txn *transaction); + void read(const std::string &sKey); + +private: + MDB_env *env; + MDB_dbi dbi; +}; -- cgit v1.2.3