DatabaseReference
A location in the database that can be read and written, as the Android SDK's DatabaseReference. Values are the platform's natural types: Map, List, String, Boolean, Long and Double (and the platform SDK's own types on Apple platforms and JS). A @Serializable class is written with the setData and updateData extensions, which map it through FirebaseFormat.Database on every platform; the SDK's setValue and updateChildren, which map a class by reflection on Android, are deprecated with an error towards them.
Types
Properties
The changes to the children of this location as a Flow, which fails if the listener is cancelled.
The underlying Firebase JS SDK object.
The underlying Firebase JS SDK object.
The JS SDK database the query belongs to (the JS SDK does not expose it on the query).
The JS SDK database the query belongs to (the JS SDK does not expose it on the query).
The parent location, or null at the root.
The reference to the location of this query.
The root of the database.
The data at this location and every change to it as a Flow, which fails if the listener is cancelled.
Functions
Adds listener for the changes to the children of this location; returns it for removeEventListener.
Adds listener for the data at this location and its changes; returns it for removeEventListener.
The iOS SDK creates a new object per call, so queries are equal when they describe the same location and constraints.
The JS SDK creates a new object per call, so queries are equal when they are of the same location and constraints.
Reads the data at this location from the server, falling back to the cache when offline.
Keeps the data of this query synchronized in the persistent cache, even while it has no listener. A no-op on JS, whose SDK has no persistent cache.
A no-op: the JS SDK has no persistent cache to keep a query synchronized in.
A no-op: the JS SDK has no persistent cache to keep a query synchronized in.
The disconnect operations of this location.
Orders the children by their keys.
Orders the children by their priorities.
Orders the children by their values.
A reference to a new child with a unique, chronologically ordered key.
Removes a listener added with addChildEventListener.
Removes a listener added with addValueEventListener.
Deletes the data at this location.
Deletes the data at this location and calls listener once the server has acknowledged it.
Runs handler as a transaction on this location, retrying it while the data changes; events fire for local updates.
Runs handler as a transaction on this location; fireLocalEvents controls the events of intermediate states.
Writes value, a plain value or a @Serializable class, to this location (see DatabaseReference.setValue). The value is mapped by the format with its static type, so a generic class maps too; an Any maps by its runtime type.
Sets the priority of this location, a String, a Double or null.
Sets the priority of this location and calls listener once the server has acknowledged it.
Writes the children in update (paths to values; a null value deletes) without replacing the other children.
Updates the children in update, each a plain value or a @Serializable class mapped by the format (see DatabaseReference.updateChildren).
Updates the children in update (see updateData) and calls listener with the outcome.
The SDK's values flow (see DataSnapshot.getValue); deprecated towards com.google.firebase.serialization.values.
The data at this location as T (see DataSnapshot.getValue) and every change to it as a Flow, as the Android SDK's values.