mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
Documentation
This commit is contained in:
1 parent
041b6abd59
commit
f665b56e2b
1 file changed
+5
-1
@@ -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)")
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user