mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
Documentation
This commit is contained in:
1 parent
3f001ba04d
commit
1b53bf9ea2
1 file changed
+12
-12
@@ -217,13 +217,13 @@ extension ValueObservation {
|
||||
/// table is modified:
|
||||
///
|
||||
/// var count = 0
|
||||
/// let reducer = AnyValueReducer(
|
||||
/// fetch: { _ in },
|
||||
/// value: { _ -> Int? in
|
||||
/// count += 1
|
||||
/// return count
|
||||
/// let observation = ValueObservation.tracking(Player.all(), reducer: ( db in
|
||||
/// AnyValueReducer(
|
||||
/// fetch: { _ in },
|
||||
/// value: { _ -> Int? in
|
||||
/// count += 1
|
||||
/// return count })
|
||||
/// })
|
||||
/// let observation = ValueObservation.tracking(Player.all(), reducer: reducer)
|
||||
/// let observer = observation.start(in: dbQueue) { count: Int in
|
||||
/// print("Players have been modified \(count) times.")
|
||||
/// }
|
||||
@@ -259,13 +259,13 @@ extension ValueObservation {
|
||||
/// table is modified:
|
||||
///
|
||||
/// var count = 0
|
||||
/// let reducer = AnyValueReducer(
|
||||
/// fetch: { _ in },
|
||||
/// value: { _ -> Int? in
|
||||
/// count += 1
|
||||
/// return count
|
||||
/// let observation = ValueObservation.tracking([Player.all()], reducer: ( db in
|
||||
/// AnyValueReducer(
|
||||
/// fetch: { _ in },
|
||||
/// value: { _ -> Int? in
|
||||
/// count += 1
|
||||
/// return count })
|
||||
/// })
|
||||
/// let observation = ValueObservation.tracking([Player.all()], reducer: reducer)
|
||||
/// let observer = observation.start(in: dbQueue) { count: Int in
|
||||
/// print("Players have been modified \(count) times.")
|
||||
/// }
|
||||
|
||||
Reference in new issue
Block a user