diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-11-22 12:05:52 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2014-11-22 12:06:12 +0100 |
commit | 64e82fe5ccfa10e1652c149d10e89b08a5aae165 (patch) | |
tree | f048169982b32867805a8ea6eebbf6264f6ca034 /store/database.h | |
parent | 9229f4aea0765265b74111ea51798efde7d07997 (diff) | |
download | sink-64e82fe5ccfa10e1652c149d10e89b08a5aae165.tar.gz sink-64e82fe5ccfa10e1652c149d10e89b08a5aae165.zip |
Buffertest + store
Diffstat (limited to 'store/database.h')
-rw-r--r-- | store/database.h | 16 |
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 | |||
4 | class Database { | ||
5 | public: | ||
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 | |||
13 | private: | ||
14 | MDB_env *env; | ||
15 | MDB_dbi dbi; | ||
16 | }; | ||