FIRDocumentChange


@interface FIRDocumentChange : NSObject

A FIRDocumentChange represents a change to the documents matching a query. It contains the document affected and the type of change that occurred (added, modified, or removed).

  • Declaration

    Objective-C

    - (nonnull id)init;
  • The type of change that occurred (added, modified, or removed).

    Declaration

    Swift

    var type: DocumentChangeType { get }

    Objective-C

    @property (readonly, nonatomic) FIRDocumentChangeType type;
  • The document affected by this change.

    Declaration

    Swift

    var document: FIRDocumentSnapshot { get }

    Objective-C

    @property (readonly, strong, nonatomic) FIRDocumentSnapshot *_Nonnull document;
  • The index of the changed document in the result set immediately prior to this FIRDocumentChange (i.e. supposing that all prior FIRDocumentChange objects have been applied). NSNotFound for FIRDocumentChangeTypeAdded events.

    Declaration

    Swift

    var oldIndex: UInt { get }

    Objective-C

    @property (readonly, nonatomic) NSUInteger oldIndex;
  • The index of the changed document in the result set immediately after this FIRDocumentChange (i.e. supposing that all prior FIRDocumentChange objects and the current FIRDocumentChange object have been applied). NSNotFound for FIRDocumentChangeTypeRemoved events.

    Declaration

    Swift

    var newIndex: UInt { get }

    Objective-C

    @property (readonly, nonatomic) NSUInteger newIndex;