Observing Changes
-
Used to subscribe to receive updates from remote peers about matching documents.
While
See moreDITSubscription
objects remain in scope they ensure that documents in the collection specified and that match the query provided will try to be kept up-to-date with the latest changes from remote peers.Declaration
Objective-C
@interface DITSubscription : NSObject
-
The type that is returned when calling when calling
observe
orobserveLocal
on aDITPendingCursorOperation
object. It handles the logic for calling the event handler that is provided toobserve
orobserveLocal
calls.
See moreDITLiveQuery
objects must be kept in scope for as long as you with to have your event handler be called when there is an update to a document matching the query you provide. When you no longer want to receive updates about documents matching a query then you must callstop
on theDITLiveQuery
object.Declaration
Objective-C
@interface DITLiveQuery : NSObject
-
Describes events delivered by a
DITLiveQuery
.Only the first event in a live query’s lifetime will have the
See moreisInitial
BOOL
set totrue
. The first event will return empty arrays for all values because there can’t be any modifications to the set of matching documents for a live query if it’s the first time event handler is being called.Declaration
Objective-C
@interface DITLiveQueryEvent : NSObject
-
Provides information about a live query event relating to a single document live query.
See moreDeclaration
Objective-C
@interface DITSingleDocumentLiveQueryEvent : NSObject
-
An object that describes how a document’s position in a live query’s list of matching documents has changed since the previous live query event.
See moreDeclaration
Objective-C
@interface DITLiveQueryMove : NSObject