FirebaseFirestore Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
FIRDocumentChange
@interface FIRDocumentChange : NSObject
A DocumentChange
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).
-
The type of change that occurred (added, modified, or removed).
-
The document affected by this change.
-
The index of the changed document in the result set immediately prior to this DocumentChange
(i.e. supposing that all prior DocumentChange
objects have been applied). NSNotFound
for
DocumentChangeTypeAdded
events.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger oldIndex;
-
The index of the changed document in the result set immediately after this DocumentChange
(i.e. supposing that all prior DocumentChange
objects and the current DocumentChange
object
have been applied). NSNotFound
for DocumentChangeTypeRemoved
events.
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger newIndex;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-11 UTC.
[null,null,["Last updated 2025-03-11 UTC."],[],[],null,["# FirebaseFirestore Framework Reference\n\nFIRDocumentChange\n=================\n\n\n @interface FIRDocumentChange : NSObject\n\nA `DocumentChange` represents a change to the documents matching a query. It contains the\ndocument affected and the type of change that occurred (added, modified, or removed).\n- `\n ``\n ``\n `\n\n ### [type](#/c:objc(cs)FIRDocumentChange(py)type)\n\n `\n ` \n The type of change that occurred (added, modified, or removed). \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/FIRDocumentChangeType.html type;\n\n- `\n ``\n ``\n `\n\n ### [document](#/c:objc(cs)FIRDocumentChange(py)document)\n\n `\n ` \n The document affected by this change. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, strong, readonly) ../Classes/FIRQueryDocumentSnapshot.html *_Nonnull document;\n\n- `\n ``\n ``\n `\n\n ### [oldIndex](#/c:objc(cs)FIRDocumentChange(py)oldIndex)\n\n `\n ` \n The index of the changed document in the result set immediately prior to this `DocumentChange`\n (i.e. supposing that all prior `DocumentChange` objects have been applied). `NSNotFound` for\n `DocumentChangeTypeAdded` events. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger oldIndex;\n\n- `\n ``\n ``\n `\n\n ### [newIndex](#/c:objc(cs)FIRDocumentChange(py)newIndex)\n\n `\n ` \n The index of the changed document in the result set immediately after this `DocumentChange`\n (i.e. supposing that all prior `DocumentChange` objects and the current `DocumentChange` object\n have been applied). `NSNotFound` for `DocumentChangeTypeRemoved` events. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) NSUInteger newIndex;"]]