mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
README
This commit is contained in:
1 parent
3687e11958
commit
c89540683f
1 file changed
+15
-10
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user