Metadata about a snapshot, describing the state of the snapshot.

Index

Properties

fromCache

fromCache:boolean

True if the snapshot was created from cached data rather than guaranteedup-to-date server data. If your listener has opted into metadata updates(viaSnapshotListenOptions)you will receive another snapshot withfromCache set to false oncethe client has received up-to-date data from the backend.

hasPendingWrites

hasPendingWrites:boolean

True if the snapshot contains the result of local writes (e.g. set() orupdate() calls) that have not yet been committed to the backend.If your listener has opted into metadata updates (viaSnapshotListenOptions) you will receive anothersnapshot withhasPendingWrites equal to false once the writes have beencommitted to the backend.

Methods

isEqual

  • isEqual(otherSnapshotMetadata):boolean
  • Returns true if thisSnapshotMetadata is equal to the provided one.

    Parameters

    Returnsboolean

    true if thisSnapshotMetadata is equal to the provided one.

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.