Update GRDBProfiling app to block-based database accesses.

This commit is contained in:
Gwendal Roué committed 2016-04-08 08:37:02 +02:00
1 parent af53fe8e79
commit 8d3796324d
1 file changed
+3 -1
@@ -78,7 +78,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func fetchRecords() {
let databasePath = NSBundle(forClass: self.dynamicType).pathForResource("ProfilingDatabase", ofType: "sqlite")!
let dbQueue = try! DatabaseQueue(path: databasePath)
let items = Item.fetchAll(dbQueue)
let items = dbQueue.inDatabase { db in
Item.fetchAll(db)
}
assert(items.count == expectedRowCount)
assert(items[0].i0 == 0)
assert(items[1].i1 == 1)