Methods

onCreate

onCreate(handler) returns functions.CloudFunction

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

Parameter

handler

function(non-null functions.database.DataSnapshot, optional non-null functions.EventContext)

Event handler which is run every time new data is created in Firebase Realtime Database.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export.

onDelete

onDelete(handler) returns functions.CloudFunction

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

Parameter

handler

function(non-null functions.database.DataSnapshot, optional non-null functions.EventContext)

Event handler which is run every time data is deleted from Firebase Realtime Database.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.

onUpdate

onUpdate(handler) returns functions.CloudFunction

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

Parameter

handler

function(functions.Change containing non-null functions.database.DataSnapshot, optional non-null functions.EventContext)

Event handler which is run every time a Firebase Realtime Database write occurs.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.

onWrite

onWrite(handler) returns functions.CloudFunction

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

Parameter

handler

function(functions.Change containing non-null functions.database.DataSnapshot, optional non-null functions.EventContext)

Event handler which is run every time a Firebase Realtime Database write occurs.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.