mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Documentation
This commit is contained in:
1 parent
77de519fcc
commit
53f98a7bf6
1 file changed
+3
-7
@@ -6338,7 +6338,7 @@ struct TeamInfo {
|
||||
|
||||
let observation = ValueObservation.tracking(
|
||||
teamRequest, playersRequest,
|
||||
fetch { db -> TeamInfo? in
|
||||
fetch: { db -> TeamInfo? in
|
||||
guard let team = try teamRequest.fetchOne(db) else {
|
||||
return nil
|
||||
}
|
||||
@@ -6358,12 +6358,8 @@ extension TeamInfo: Equatable { ... }
|
||||
|
||||
let observation = ValueObservation.tracking(
|
||||
withUniquing: teamRequest, playersRequest,
|
||||
fetch { db -> TeamInfo? in
|
||||
guard let team = try teamRequest.fetchOne(db) else {
|
||||
return nil
|
||||
}
|
||||
let players = try playersRequest.fetchAll(db)
|
||||
return TeamInfo(team: team, players: players)
|
||||
fetch: { db -> TeamInfo? in
|
||||
// same code as above
|
||||
})
|
||||
|
||||
let observer = dbQueue.start(observation) { teamInfo: TeamInfo? in
|
||||
|
||||
Reference in new issue
Block a user