SharedValueObservationExtent
The extent of the shared subscription to a SharedValueObservation
.
enum SharedValueObservationExtent
The extent of the shared subscription to a SharedValueObservation
.
enum SharedValueObservationExtent
import GRDB
A toolkit for SQLite databases, with a focus on application development
final class SharedValueObservation<Element> where Element : Sendable
A shared value observation spares database resources by sharing a single underlying ValueObservation
subscription.
case observationLifetime
The SharedValueObservation
starts a single database observation, which stops when the SharedValueObservation
is deallocated and all subscriptions terminated.
case whileObserved
The SharedValueObservation
stops database observation when the number of subscriptions drops down to zero. Database observation restarts on the next subscription.
func shared(in reader: any DatabaseReader, scheduling scheduler: some ValueObservationScheduler = .async(onQueue: .main), extent: SharedValueObservationExtent = .whileObserved) -> SharedValueObservation<Reducer.Value>
Returns a shared value observation that spares database resources by sharing a single underlying ValueObservation
subscription.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.