summaryrefslogtreecommitdiffstats
path: root/tests/hawd
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-08-23 23:57:09 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-08-23 23:57:09 +0200
commit9c3d000e11d3b1fc6c6c205fe9e7ea26c11092c6 (patch)
tree7cf47fd2334487a0e4f2bfef73c8e09e165dc4cc /tests/hawd
parentae0255bf8eb913004082278af27d69047503ea71 (diff)
downloadsink-9c3d000e11d3b1fc6c6c205fe9e7ea26c11092c6.tar.gz
sink-9c3d000e11d3b1fc6c6c205fe9e7ea26c11092c6.zip
Removed convenience API
Diffstat (limited to 'tests/hawd')
-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;