SharedValueObservation is experimental

This commit is contained in:
Gwendal Roué committed 2021-10-31 13:55:18 +01:00
1 parent 3e58f35f1e
commit 1ee2c8097a
2 files changed
+6

No files matched your search

@@ -26,6 +26,8 @@ extension ValueObservation {
/// database observation for all subscriptions, and thus spares
/// database resources.
///
/// [**Experimental**](http://github.com/groue/GRDB.swift#what-are-experimental-features)
///
/// For example:
///
/// let sharedObservation = ValueObservation
@@ -88,6 +90,8 @@ extension ValueObservation {
}
}
/// [**Experimental**](http://github.com/groue/GRDB.swift#what-are-experimental-features)
///
/// A shared value observation that shares a single underlying database
/// observation for all subscriptions, and thus spares database resources.
///
+2
View File
@@ -6134,6 +6134,8 @@ See also [ValueObservation.handleEvents](#valueobservationhandleevents).
### ValueObservation Sharing
[**:fire: EXPERIMENTAL**](#what-are-experimental-features)
**Sharing a ValueObservation allows several components of your app to be notified of database changes, in an efficient way.**
A shared observation spares database resources. For example, when a database change happens, a fresh value is fetched only once, and then notified to all subscriptions.