Oracle® Backend For Firebase JavaScript Namespace SDK Reference, Release 26.1.0
    Preparing search index...
    Oracle® Backend For Firebase JavaScript Namespace SDK Reference
    Release 26.1.0

    G48197-02

    A DocumentSnapshot contains data read from a document in your database. The data can be extracted with .data() or .get(<field>) to get a specific field.

    Type Parameters

    • T = any

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    exists: boolean

    True if the document exists.

    id: string

    The ID of the document for which this DocumentSnapshot contains data.

    Metadata about this snapshot concerning its source and if it has local modifications.

    A DocumentReference to the document location.

    Methods

    • Retrieves all fields in the document as an Object. Returns 'undefined' if the document doesn't exist.

      Returns T

      An Object containing all fields in the document or 'undefined' if the document doesn't exist.

    • Retrieves the field specified.

      Parameters

      Returns any

      Field value or null.

      Throws an error if document does not exist or invalid field name.

    • Checks whether this DocumentSnapshot is equal to the provided one.

      Parameters

      Returns boolean

      True if equal, false otherwise.

      Throws an error if snap is not a DocumentSnapshot instance.