summaryrefslogtreecommitdiffstats
path: root/tests/hawd/dataset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hawd/dataset.cpp')
-rw-r--r--tests/hawd/dataset.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hawd/dataset.cpp b/tests/hawd/dataset.cpp
index 96479e0..e1cc3a4 100644
--- a/tests/hawd/dataset.cpp
+++ b/tests/hawd/dataset.cpp
@@ -237,7 +237,7 @@ qint64 Dataset::insertRow(const Row &row)
237 } 237 }
238 238
239 qint64 key = row.key(); 239 qint64 key = row.key();
240 m_transaction.write(QByteArray::fromRawData((const char *)&key, sizeof(qint64)), row.toBinary()); 240 m_transaction.openDatabase().write(QByteArray::fromRawData((const char *)&key, sizeof(qint64)), row.toBinary());
241 return key; 241 return key;
242} 242}
243 243
@@ -253,7 +253,7 @@ void Dataset::eachRow(const std::function<void(const Row &row)> &resultHandler)
253 } 253 }
254 254
255 Row row(*this); 255 Row row(*this);
256 m_transaction.scan("", 256 m_transaction.openDatabase().scan("",
257 [&](const QByteArray &key, const QByteArray &value) -> bool { 257 [&](const QByteArray &key, const QByteArray &value) -> bool {
258 if (key.size() != sizeof(qint64)) { 258 if (key.size() != sizeof(qint64)) {
259 return true; 259 return true;
@@ -276,7 +276,7 @@ Dataset::Row Dataset::row(qint64 key)
276 } 276 }
277 277
278 Row row(*this, key); 278 Row row(*this, key);
279 m_transaction.scan(QByteArray::fromRawData((const char *)&key, sizeof(qint64)), 279 m_transaction.openDatabase().scan(QByteArray::fromRawData((const char *)&key, sizeof(qint64)),
280 [&row](const QByteArray &key, const QByteArray &value) -> bool { 280 [&row](const QByteArray &key, const QByteArray &value) -> bool {
281 row.fromBinary(value); 281 row.fromBinary(value);
282 return true; 282 return true;