Stay organized with collections
Save and categorize content based on your preferences.
Properties
fromCache
fromCache: boolean
hasPendingWrites
hasPendingWrites: boolean
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 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/node/firebase).\n- [firestore](/docs/reference/node/firebase.firestore).\n- SnapshotMetadata \nMetadata about a snapshot, describing the state of the snapshot.\n\nIndex\n\nProperties\n\n- [fromCache](/docs/reference/node/firebase.firestore.SnapshotMetadata#fromcache)\n- [hasPendingWrites](/docs/reference/node/firebase.firestore.SnapshotMetadata#haspendingwrites)\n\nMethods\n\n- [isEqual](/docs/reference/node/firebase.firestore.SnapshotMetadata#isequal)\n\nProperties\n\nfromCache \nfromCache: boolean \nTrue if the snapshot was created from cached data rather than guaranteed\nup-to-date server data. If your listener has opted into metadata updates\n(via `SnapshotListenOptions`)\nyou will receive another snapshot with `fromCache` set to false once\nthe client has received up-to-date data from the backend.\n\nhasPendingWrites \nhasPendingWrites: boolean \nTrue if the snapshot contains the result of local writes (e.g. set() or\nupdate() calls) that have not yet been committed to the backend.\nIf your listener has opted into metadata updates (via\n`SnapshotListenOptions`) you will receive another\nsnapshot with `hasPendingWrites` equal to false once the writes have been\ncommitted to the backend.\n\nMethods\n\nisEqual\n\n- isEqual ( other : [SnapshotMetadata](/docs/reference/node/firebase.firestore.SnapshotMetadata) ) : boolean\n- Returns true if this `SnapshotMetadata` is equal to the provided one.\n\n Parameters\n -\n\n other: [SnapshotMetadata](/docs/reference/node/firebase.firestore.SnapshotMetadata) \n The `SnapshotMetadata` to compare against.\n\n Returns boolean\n\ntrue if this `SnapshotMetadata` is equal to the provided one."]]
Metadata about a snapshot, describing the state of the snapshot.