mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Small improvement
This commit is contained in:
1 parent
49a7b2091c
commit
1602a37d08
1 file changed
+2
-4
@@ -461,9 +461,7 @@ class NaiveLibraryManager {
|
||||
func books(writtenBy author: Author) -> [Book] {
|
||||
do {
|
||||
return try dbQueue.read { db in
|
||||
try Book
|
||||
.filter(Book.Columns.authorId == author.id)
|
||||
.fetchAll(db)
|
||||
try author.books.fetchAll(db)
|
||||
}
|
||||
} catch {
|
||||
return []
|
||||
@@ -514,7 +512,7 @@ class ImprovedLibraryManager {
|
||||
|
||||
func books(writtenBy author: Author) throws -> [Book] {
|
||||
return try dbQueue.read { db in
|
||||
try Book.filter(Book.Columns.authorId == author.id).fetchAll(db)
|
||||
try author.books.fetchAll(db)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user