Files
GRDB.swift/docs/6.3/data/documentation/grdb/asyncvalueobservation.json
2022-11-09 08:57:09 +01:00

1 line
10 KiB
JSON

{"seeAlsoSections":[{"title":"Observing Database Values","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/SharedValueObservation","doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"AsyncValueObservation"}],"role":"symbol","title":"AsyncValueObservation","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsyncValueObservation"}],"symbolKind":"struct","externalID":"s:4GRDB21AsyncValueObservationV","modules":[{"name":"GRDB"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"10.15","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"6.0","deprecated":false}]},"abstract":[{"type":"text","text":"An asynchronous sequence of values observed by a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation"},{"type":"text","text":"."}],"sections":[],"identifier":{"url":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/GRDB\/Sci"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"hierarchy":{"paths":[["doc:\/\/GRDB\/documentation\/GRDB","doc:\/\/GRDB\/documentation\/GRDB\/DatabaseObservation"]]},"topicSections":[{"title":"Structures","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/Iterator"]},{"title":"Instance Methods","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/makeAsyncIterator()"]},{"title":"Type Aliases","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/AsyncIterator","doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/BufferingPolicy"]},{"title":"Default Implementations","identifiers":["doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/AsyncSequence-Implementations"],"generated":true}],"variants":[{"paths":["\/documentation\/grdb\/asyncvalueobservation"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsyncValueObservation"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Element"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":""},{"type":"reference","isActive":true,"identifier":"https:\/\/github.com\/groue\/GRDB.swift\/blob\/master\/README.md#what-are-experimental-features"}]}],"type":"aside","name":"Note"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An "},{"type":"codeVoice","code":"AsyncValueObservation"},{"type":"text","text":" sequence produces a fresh value whenever the"},{"type":"text","text":" "},{"type":"text","text":"results of database requests change."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For example:"}]},{"type":"codeListing","syntax":"swift","code":["let observation = ValueObservation.tracking { db in"," try Player.fetchAll(db)","}","","for try await players in observation.values(in: dbQueue) {"," print(\"Fresh players: \\(players)\")","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You build an "},{"type":"codeVoice","code":"AsyncValueObservation"},{"type":"text","text":" from "},{"type":"reference","isActive":true,"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation"},{"type":"text","text":" or"},{"type":"text","text":" "},{"type":"reference","isActive":true,"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SharedValueObservation"},{"type":"text","text":"."}]}]}],"references":{"doc://GRDB/documentation/GRDB/AsyncValueObservation/Iterator":{"role":"symbol","title":"AsyncValueObservation.Iterator","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Iterator"}],"abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/Iterator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Iterator"}],"url":"\/documentation\/grdb\/asyncvalueobservation\/iterator"},"doc://GRDB/Sci":{"type":"unresolvable","title":"_Concurrency.AsyncSequence","identifier":"doc:\/\/GRDB\/Sci"},"doc://GRDB/documentation/GRDB/AsyncValueObservation/AsyncIterator":{"role":"symbol","title":"AsyncValueObservation.AsyncIterator","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsyncIterator"}],"abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/AsyncIterator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsyncIterator"}],"url":"\/documentation\/grdb\/asyncvalueobservation\/asynciterator"},"doc://GRDB/documentation/GRDB/ValueObservation":{"role":"symbol","title":"ValueObservation","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ValueObservation"}],"abstract":[{"type":"codeVoice","code":"ValueObservation"},{"type":"text","text":" tracks changes in the results of database requests, and"},{"type":"text","text":" "},{"type":"text","text":"notifies fresh values whenever the database changes."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ValueObservation"}],"url":"\/documentation\/grdb\/valueobservation"},"doc://GRDB/documentation/GRDB/SharedValueObservation":{"role":"symbol","title":"SharedValueObservation","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedValueObservation"}],"abstract":[{"type":"text","text":"A shared value observation spares database resources by sharing a single"},{"type":"text","text":" "},{"type":"text","text":"underlying "},{"type":"reference","isActive":true,"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation"},{"type":"text","text":" subscription."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/SharedValueObservation","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedValueObservation"}],"url":"\/documentation\/grdb\/sharedvalueobservation"},"https://github.com/groue/GRDB.swift/blob/master/README.md#what-are-experimental-features":{"title":"🔥 EXPERIMENTAL","titleInlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"🔥 EXPERIMENTAL"}]}],"type":"link","identifier":"https:\/\/github.com\/groue\/GRDB.swift\/blob\/master\/README.md#what-are-experimental-features","url":"https:\/\/github.com\/groue\/GRDB.swift\/blob\/master\/README.md#what-are-experimental-features"},"doc://GRDB/documentation/GRDB/AsyncValueObservation":{"role":"symbol","title":"AsyncValueObservation","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsyncValueObservation"}],"abstract":[{"type":"text","text":"An asynchronous sequence of values observed by a "},{"type":"reference","isActive":true,"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/ValueObservation"},{"type":"text","text":"."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsyncValueObservation"}],"url":"\/documentation\/grdb\/asyncvalueobservation"},"doc://GRDB/documentation/GRDB/DatabaseObservation":{"role":"collectionGroup","title":"Database Observation","abstract":[{"type":"text","text":"Observe database changes and transactions."}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/DatabaseObservation","kind":"article","type":"topic","url":"\/documentation\/grdb\/databaseobservation"},"doc://GRDB/documentation/GRDB":{"role":"collection","title":"GRDB","abstract":[{"type":"text","text":"A toolkit for SQLite databases, with a focus on application development"}],"identifier":"doc:\/\/GRDB\/documentation\/GRDB","kind":"symbol","type":"topic","url":"\/documentation\/grdb"},"doc://GRDB/documentation/GRDB/AsyncValueObservation/makeAsyncIterator()":{"role":"symbol","title":"makeAsyncIterator()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"makeAsyncIterator"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"AsyncValueObservation","preciseIdentifier":"s:4GRDB21AsyncValueObservationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Element"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Iterator","preciseIdentifier":"s:4GRDB21AsyncValueObservationV8IteratorV"}],"abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/makeAsyncIterator()","kind":"symbol","type":"topic","url":"\/documentation\/grdb\/asyncvalueobservation\/makeasynciterator()"},"doc://GRDB/documentation/GRDB/AsyncValueObservation/BufferingPolicy":{"role":"symbol","title":"AsyncValueObservation.BufferingPolicy","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"BufferingPolicy"}],"abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/BufferingPolicy","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"BufferingPolicy"}],"url":"\/documentation\/grdb\/asyncvalueobservation\/bufferingpolicy"},"doc://GRDB/documentation/GRDB/AsyncValueObservation/AsyncSequence-Implementations":{"role":"collectionGroup","title":"AsyncSequence Implementations","abstract":[],"identifier":"doc:\/\/GRDB\/documentation\/GRDB\/AsyncValueObservation\/AsyncSequence-Implementations","kind":"article","type":"topic","url":"\/documentation\/grdb\/asyncvalueobservation\/asyncsequence-implementations"}}}