Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all observationForCount/All/First methods #738

Merged
merged 6 commits into from
Mar 25, 2020

Conversation

groue
Copy link
Owner

@groue groue commented Mar 25, 2020

This pull request leaves ValueObservation.tracking(_:) as the unique way to create a ValueObservation, by removing all remaining convenience methods.

// BEFORE: GRDB 4
let observation = request.observationForCount()
let observation = request.observationForFirst()
let observation = request.observationForAll()
let observation = ValueObservation.tracking(request, fetch: { db in ... })

// NEW: GRDB 5
let observation = ValueObservation.tracking(request.fetchCount)
let observation = ValueObservation.tracking(request.fetchOne)
let observation = ValueObservation.tracking(request.fetchAll)
let observation = ValueObservation.tracking { db in ... }

@groue groue added this to the GRDB 5 milestone Mar 25, 2020
@groue groue mentioned this pull request Mar 25, 2020
42 tasks
@groue groue merged commit 27dd08f into GRDB5 Mar 25, 2020
@groue groue deleted the dev/drop-ObservationFor branch March 25, 2020 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant