Documentation

This commit is contained in:
Gwendal Roué committed 2016-12-12 08:46:50 +01:00
1 parent 041b6abd59
commit f665b56e2b
1 file changed
+5 -1
+5 -1
View File
@@ -3327,9 +3327,13 @@ struct BookAuthorPair : RowConvertible {
"authors": SuffixRowAdapter(fromIndex: db.columnCount(in: "books"))])
}
}
static func fetchAll(_ db: Database) throws -> [BookAuthorPair] {
return try all().fetchAll(db)
}
}
for pair in try BookAuthorPair.all().fetchAll(db) {
for pair in try BookAuthorPair.fetchAll(db) {
print("\(pair.book.title) by \(pair.author.name)")
}
```