Reference | JavaScript SDK  |  Firebase JavaScript API reference (original) (raw)

Index

Properties

key

key: string | null

parent

ref

root

Methods

child

Returns Reference

The specified child location.

endAt

Returns Query

endBefore

Returns Query

equalTo

Returns Query

get

A promise which resolves to the resulting DataSnapshot if a value is available, or rejects if the client is unable to return a value (e.g., if the server is unreachable and there is nothing cached).

isEqual

Returns boolean

Whether or not the current and provided queries are equivalent.

limitToFirst

Returns Query

limitToLast

Returns Query

off

Returns void

on

Returns (a: DataSnapshot | null, b?: string | null) => any

The provided callback function is returned unmodified. This is just for convenience if you want to pass an inline function to on() but store the callback function for later passing to off().

onDisconnect

once

Returns Promise<DataSnapshot>

orderByChild

Returns Query

orderByKey

orderByPriority

orderByValue

push

Returns ThenableReference

Combined Promise and Reference; resolves when write is complete, but can be used immediately as the Reference to the child location.

remove

Returns Promise<void>

Resolves when remove on server is complete.

set

Returns Promise<void>

Resolves when write to server is complete.

setPriority

Returns Promise<void>

setWithPriority

Returns Promise<void>

startAfter

Returns Query

startAt

Returns Query

toJSON

A JSON-serializable representation of this object.

toString

The absolute URL for this location.

transaction

Returns Promise<TransactionResult>

Returns a Promise that can optionally be used instead of the onComplete callback to handle success and failure.

update

Returns Promise<void>

Resolves when update on server is complete.