The Firebase Realtime Database reference builder interface.

Access via functions.database.ref().

Index

Properties

Private apps

apps: Apps

Private options

Private triggerResource

triggerResource: function

Type declaration

    • (): string
    • Returns string

Methods

Private changeConstructor

onCreate

  • Event handler that fires every time new data is created in Firebase Realtime Database.

    Parameters

    • handler: function

      Event handler that runs every time new data is created in Firebase Realtime Database.

    Returns CloudFunction<DataSnapshot>

    A Cloud Function that you can export and deploy.

onDelete

  • Event handler that fires every time data is deleted from Firebase Realtime Database.

    Parameters

    • handler: function

      Event handler that runs every time data is deleted from Firebase Realtime Database.

    Returns CloudFunction<DataSnapshot>

    A Cloud Function that you can export and deploy.

Private onOperation

  • onOperation<T>(handler: function, eventType: string, dataConstructor: function): CloudFunction<T>
  • Type parameters

    • T

    Parameters

    • handler: function
        • Parameters

          Returns PromiseLike<any> | any

    • eventType: string
    • dataConstructor: function
        • (raw: Event | Event): any
        • Parameters

          • raw: Event | Event

          Returns any

    Returns CloudFunction<T>

onUpdate

  • Event handler that fires every time data is updated in Firebase Realtime Database.

    Parameters

    Returns CloudFunction<Change<DataSnapshot>>

    A Cloud Function which you can export and deploy.

onWrite

  • Event handler that fires every time a Firebase Realtime Database write of any kind (creation, update, or delete) occurs.

    Parameters

    Returns CloudFunction<Change<DataSnapshot>>

    A Cloud Function that you can export and deploy.