diff options
Diffstat (limited to 'common/index.cpp')
-rw-r--r-- | common/index.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/index.cpp b/common/index.cpp index 13ca6ed..86a2dd5 100644 --- a/common/index.cpp +++ b/common/index.cpp | |||
@@ -2,6 +2,14 @@ | |||
2 | 2 | ||
3 | #include "log.h" | 3 | #include "log.h" |
4 | 4 | ||
5 | Index::Index(const QString &storageRoot, const QString &dbName, const QString &indexName, Sink::Storage::DataStore::AccessMode mode) | ||
6 | : mTransaction(Sink::Storage::DataStore(storageRoot, dbName, mode).createTransaction(mode)), | ||
7 | mDb(mTransaction.openDatabase(indexName.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)), | ||
8 | mName(indexName), | ||
9 | mLogCtx("index." + indexName.toLatin1()) | ||
10 | { | ||
11 | } | ||
12 | |||
5 | Index::Index(const QString &storageRoot, const QString &name, Sink::Storage::DataStore::AccessMode mode) | 13 | Index::Index(const QString &storageRoot, const QString &name, Sink::Storage::DataStore::AccessMode mode) |
6 | : mTransaction(Sink::Storage::DataStore(storageRoot, name, mode).createTransaction(mode)), | 14 | : mTransaction(Sink::Storage::DataStore(storageRoot, name, mode).createTransaction(mode)), |
7 | mDb(mTransaction.openDatabase(name.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)), | 15 | mDb(mTransaction.openDatabase(name.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)), |