Firebase.Firestore.DocumentChange

ADocumentChange represents a change to the documents matching a query.

Summary

It contains the document affected and the type of change that occurred (added, modified, or removed).

Public types

Type{
  Added = 0,
  Modified = 1,
  Removed = 2
}
enum
An enumeration ofDocumentChange types.

Properties

ChangeType
Returns the type of theDocumentChange.
NewIndex
int
The index of the changed document in the result set immediately after thisDocumentChange (i.e.
OldIndex
int
The index of the changed document in the result set immediately prior to thisDocumentChange (i.e.

Public attributes

Document => new DocumentSnapshot(_proxy.document(), _firestore)
Returns the newly added or modified document if thisDocumentChange is for an updated document.

Public functions

Equals(object obj)
override bool
Equals(DocumentChange other)
bool
GetHashCode()
override int

Public types

Type

Type

An enumeration ofDocumentChange types.

Properties
Added

Indicates a new document was added to the set of documents matching the query.

Modified

Indicates document within the query was modified.

Removed

Indicates a document within the query was removed (either deleted or no longer matches the query).

Properties

ChangeType

TypeChangeType

Returns the type of theDocumentChange.

NewIndex

intNewIndex

The index of the changed document in the result set immediately after thisDocumentChange (i.e.

supposing that all priorDocumentChange objects and the currentDocumentChange object have been applied). Returns -1 for 'removed' events.

OldIndex

intOldIndex

The index of the changed document in the result set immediately prior to thisDocumentChange (i.e.

supposing that all priorDocumentChange objects have been applied). Returns -1 for 'added' events.

Public attributes

Document

DocumentSnapshotDocument=>newDocumentSnapshot(_proxy.document(),_firestore)

Returns the newly added or modified document if thisDocumentChange is for an updated document.

Returns the deleted document if this document change represents a removal.

Public functions

Equals

overrideboolEquals(objectobj)

Equals

boolEquals(DocumentChangeother)

GetHashCode

overrideintGetHashCode()

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2022-07-27 UTC.