DITLiveQueryEvent

@interface DITLiveQueryEvent : NSObject

Describes events delivered by a DITLiveQuery.

Only the first event in a live query’s lifetime will have the isInitial BOOL set to true. 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.

  • Whether or not this is the initial event being delivered.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isInitial;
  • The documents that previously matched the query, before the latest event.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<DITDocument *> *_Nonnull oldDocuments;
  • The indexes in the array of matching documents that accompany this event, which relate to a document that was not in the previous most recent list of matching documents.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSNumber *> *_Nonnull insertions;
  • The indexes in the array oldDocument, which relate to a document that was in the previous most recent list of matching documents but is no longer a matching document.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSNumber *> *_Nonnull deletions;
  • The indexes in the array of matching documents that accompany this event, which relate to a document that has been updated since the previous live query event.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSNumber *> *_Nonnull updates;
  • Objects that describe how documents’ positions in the list of matching documents have changed since the previous live query event.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<DITLiveQueryMove *> *_Nonnull moves;