java.lang.Object | |
↳ | com.google.firebase.firestore.DocumentChange |
A DocumentChange represents a change to the documents matching a query. It contains the document affected and a the type of change that occurred (added, modifed, or removed).
Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DocumentChange.Type | An enumeration of snapshot diff types. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the newly added or modified document if this DocumentChange is for an updated document.
| |||||||||||
The index of the changed document in the result set immediately after this DocumentChange (i.e.
| |||||||||||
The index of the changed document in the result set immediately prior to this DocumentChange
(i.e.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the newly added or modified document if this DocumentChange is for an updated document. Returns the deleted document if this document change represents a removal.
Returns | |
---|---|
QueryDocumentSnapshot |
A snapshot of the new data (for Type.ADDED or Type.MODIFIED) or the removed data (for Type.REMOVED). |
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). Returns -1 for 'removed' events.
Returns | |
---|---|
int |
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). Returns -1 for 'added' events.
Returns | |
---|---|
int |