Package-level declarations

Functions

Link copied to clipboard
inline fun <T> DataSnapshot.getValue(): T?

The data as T, as the Android SDK's reified getValue, through the serializer of T with the Android SDK's rules (FirebaseFormat.Database, see databaseFormat) on every platform: a @Serializable class, a Map, a List or a primitive reads the same everywhere. It takes the place of the SDK's reflective getValue(Class) and of the SDK's own reified getValue<T>() (com.google.firebase.database.getValue), which is deprecated with an error.

inline fun <T> MutableData.getValue(): T?

The data as T, as the Android SDK's reified getValue (see DataSnapshot.getValue).

Link copied to clipboard
inline fun <T> DatabaseReference.setData(value: T): <Error class: unknown class><Nothing?>

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.

inline fun <T> MutableData.setData(value: T)

Replaces the data of the transaction with value, a plain value or a @Serializable class mapped by the format (see MutableData.value).

inline fun <T> OnDisconnect.setData(value: T): <Error class: unknown class><Nothing?>

Writes value, a plain value or a @Serializable class mapped by the format, when the client disconnects (see OnDisconnect.setValue).

Writes value (see setData) and calls listener with the outcome.

inline fun <T> DatabaseReference.setData(value: T, priority: Any?): <Error class: unknown class><Nothing?>

Writes value (see setData) with priority.

Writes value on disconnect (see setData) and calls listener with the outcome.

inline fun <T> OnDisconnect.setData(value: T, priority: Double): <Error class: unknown class><Nothing?>
inline fun <T> OnDisconnect.setData(value: T, priority: String?): <Error class: unknown class><Nothing?>

Writes value on disconnect (see setData) with priority.

inline fun <T> DatabaseReference.setData(value: T, priority: Any?, listener: DatabaseReference.CompletionListener?)

Writes value (see setData) with priority and calls listener with the outcome.

inline fun <T> OnDisconnect.setData(value: T, priority: Double, listener: DatabaseReference.CompletionListener?)
inline fun <T> OnDisconnect.setData(value: T, priority: String?, listener: DatabaseReference.CompletionListener?)
inline fun <T> OnDisconnect.setData(value: T, priority: Map<*, *>?, listener: DatabaseReference.CompletionListener?)

Writes value on disconnect (see setData) with priority and calls listener with the outcome.

Link copied to clipboard
fun DatabaseReference.updateData(update: Map<String, Any?>): <Error class: unknown class><Nothing?>

Updates the children in update, each a plain value or a @Serializable class mapped by the format (see DatabaseReference.updateChildren).

fun OnDisconnect.updateData(update: Map<String, Any?>): <Error class: unknown class><Nothing?>

Updates the children in update when the client disconnects (see DatabaseReference.updateData).

Updates the children in update (see updateData) and calls listener with the outcome.

Updates the children in update on disconnect (see updateData) and calls listener with the outcome.

Link copied to clipboard
inline fun <T> Query.values(): Flow<T?>

The data at this location as T (see DataSnapshot.getValue) and every change to it as a Flow, as the Android SDK's values.