Structures
The following structures are available globally.
-
Represents a change to a document by providing a value representing the document’s old state and a value representing the document’s new state. If it is the first time that one of these events is delivered for a
See moreDittoSingleDocumentLiveQuery
then theisInitial
value will betrue
and thenewDocument
value will be populated, if there existed a document with the relevant ID. If there is no matching document found then botholdDocument
andnewDocument
will benil
. If the document exists and is removed at a later date then an event will be delivered whereoldDocument
will be the most recent version of the document andnewDocument
will benil
. Similarly, if there was no document with the relevant ID and a document with the ID is later added then an event will be delivered whereoldDocument
isnil
andnewDocument
will be the document as it was just inserted.Declaration
Swift
public struct DittoSingleDocumentLiveQueryEvent<T>