Options that configure how data is retrieved from aDocumentSnapshot(e.g. the desired behavior for server timestamps that have not yet been setto their final value).

Index

Properties

Optional serverTimestamps

serverTimestamps:"estimate" |"previous" |"none"

If set, controls the return value for server timestamps that have not yetbeen set to their final value.

By specifying 'estimate', pending server timestamps return an estimatebased on the local clock. This estimate will differ from the final valueand cause these values to change once the server result becomes available.

By specifying 'previous', pending timestamps will be ignored and returntheir previous value instead.

If omitted or set to 'none',null will be returned by default until theserver value becomes available.

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.