This commit is contained in:
Gwendal Roué committed 2018-12-01 17:11:56 +01:00
1 parent 3687e11958
commit c89540683f
1 file changed
+15 -10
+15 -10
View File
@@ -6260,6 +6260,21 @@ protocol TransactionObserverType : class {
Changes are only notified after they have been committed in the database. No insertion, update, or deletion in tracked tables is missed. This includes indirect changes triggered by [foreign keys](https://www.sqlite.org/foreignkeys.html#fk_actions) or [SQL triggers](https://www.sqlite.org/lang_createtrigger.html).
- **[ValueObservation Usage](#valueobservation-usage)**
- [ValueObservation.trackingCount, trackingOne, trackingAll](#valueobservationtrackingcount-trackingone-trackingall)
- [ValueObservation.tracking(_:fetch:)](#valueobservationtracking_fetch)
- [ValueObservation Transformations](#valueobservation-transformations)
- [ValueObservation.map](#valueobservationmap)
- [ValueObservation.compactMap](#valueobservationcompactmap)
- [ValueObservation.combine(...)](#valueobservationcombine)
- [ValueObservation Error Handling](#valueobservation-error-handling)
- [ValueObservation Options](#valueobservation-options)
- [Advanced: ValueObservation.tracking(_:reducer:)](#advanced-valueobservationtracking_reducer)
### ValueObservation Usage
Here is a typical UIViewController which observes the database in order to keep its view up-to-date:
```swift
@@ -6300,16 +6315,6 @@ The observer returned by the `start` method is stored in a property of the view
> :bulb: **Tip**: see the [Demo Application](DemoApps/GRDBDemoiOS/README.md) for a sample app that uses ValueObservation.
- [ValueObservation.trackingCount, trackingOne, trackingAll](#valueobservationtrackingcount-trackingone-trackingall)
- [ValueObservation.tracking(_:fetch:)](#valueobservationtracking_fetch)
- [ValueObservation Transformations](#valueobservation-transformations)
- [ValueObservation.map](#valueobservationmap)
- [ValueObservation.compactMap](#valueobservationcompactmap)
- [ValueObservation.combine(...)](#valueobservationcombine)
- [ValueObservation Error Handling](#valueobservation-error-handling)
- [ValueObservation Options](#valueobservation-options)
- [Advanced: ValueObservation.tracking(_:reducer:)](#advanced-valueobservationtracking_reducer)
### ValueObservation.trackingCount, trackingOne, trackingAll