README.md

This commit is contained in:
Gwendal Roué committed 2015-09-05 19:26:08 +02:00
1 parent f3a2e5f243
commit 78c9577b6b
1 file changed
+3 -3
+3 -3
View File
@@ -949,7 +949,7 @@ We think that this is the killer feature of GRDB.swift :bowtie:. For example:
class PersonsViewController: UITableViewController {
// Private subclass of Person, with an extra `bookCount` property:
private class PersonViewModel : Person {
private class PersonWithBookCount : Person {
var bookCount: Int!
override func updateFromRow(row: Row) {
@@ -960,13 +960,13 @@ class PersonsViewController: UITableViewController {
}
}
var persons: [PersonViewModel]!
var persons: [PersonWithBookCount]!
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
persons = dbQueue.inDatabase { db in
PersonViewModel.fetchAll(db,
PersonWithBookCount.fetchAll(db,
"SELECT persons.*, COUNT(*) AS bookCount " +
"FROM persons " +
"JOIN books ON books.ownerID = persons.id " +