mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-29 04:24:21 +00:00
Update GRDBProfiling app to block-based database accesses.
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user