Package-level declarations

Types

Link copied to clipboard
sealed class ChildEvent

A change to a child of a location, emitted by Query.childEvents.

Link copied to clipboard

Receives the changes to the children of a location; see Query.addChildEventListener.

Link copied to clipboard
actual class DatabaseError
expect class DatabaseError

A failed operation or cancelled listener, as the Android SDK's DatabaseError; code is one of the constants.

actual class DatabaseError
actual class DatabaseError
Link copied to clipboard
expect open class DatabaseException

Thrown when an operation on the database fails, as the Android SDK's DatabaseException.

actual open class DatabaseException
Link copied to clipboard
actual open class DatabaseReference : Query
actual open class DatabaseReference : Query
expect open class DatabaseReference : Query

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.

actual open class DatabaseReference : Query
actual open class DatabaseReference : Query
actual open class DatabaseReference : Query
Link copied to clipboard
actual class DataSnapshot
actual class DataSnapshot
expect class DataSnapshot

An immutable copy of the data at a location, as the Android SDK's DataSnapshot. value is the natural type of the data: a Map, a List, a String, a Boolean, a Long, a Double or null. A custom class is read with the reified getValue<T>() extension, which maps a @Serializable class with the Android SDK's rules on every platform; the SDK's reflective getValue(Class) and getValue(GenericTypeIndicator) are deprecated with an error on Android.

actual class DataSnapshot
actual class DataSnapshot
actual class DataSnapshot
Link copied to clipboard

The SDK's exclusion annotation; kotlinx.serialization.Transient excludes a property on every platform.

Link copied to clipboard
actual class FirebaseDatabase
actual class FirebaseDatabase
expect class FirebaseDatabase

The entry point of the Realtime Database, as the Android SDK's com.google.firebase.database.FirebaseDatabase. Persistence settings are accepted on every platform (the JS SDK has no disk persistence, so they are ignored there).

actual class FirebaseDatabase
actual class FirebaseDatabase
actual class FirebaseDatabase
Link copied to clipboard
abstract class GenericTypeIndicator<T>

The Android SDK's GenericTypeIndicator, kept so that its getValue(GenericTypeIndicator) members compile (they are deprecated with an error towards the reified getValue<T>(), which maps through the format on every platform).

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class IgnoreExtraProperties

The SDK's annotation; com.google.firebase.serialization.IgnoreExtraProperties is read on every platform.

Link copied to clipboard
interface Logger

The logging of the Realtime Database, as the Android SDK's Logger; Level is passed to FirebaseDatabase.setLogLevel.

Link copied to clipboard
actual class MutableData
actual class MutableData
expect class MutableData

The data of a location inside a transaction, as the Android SDK's MutableData: value is read and then set to the new data before the Transaction.Handler returns Transaction.success.

actual class MutableData

The data of a transaction as a JS value tree: the JS SDK's transaction receives the current value and returns the new one, so root holds the value being edited and each child refers to a path in it. A node with a priority is held in the SDK's { ".value": data, ".priority": priority } form, which every operation looks through. The tree is read and written through own properties only, so that a path such as __proto__ cannot reach the prototype chain.

actual class MutableData
actual class MutableData

The data of a transaction as a JS value tree: the JS SDK's transaction receives the current value and returns the new one, so root holds the value being edited and each child refers to a path in it. A node with a priority is held in the SDK's { ".value": data, ".priority": priority } form, which every operation looks through. The tree is read and written through own properties only, so that a path such as __proto__ cannot reach the prototype chain.

Link copied to clipboard
actual class OnDisconnect
actual class OnDisconnect
expect class OnDisconnect

Writes the server applies when this client disconnects, as the Android SDK's OnDisconnect; obtained from DatabaseReference.onDisconnect. Each operation completes once the server has registered it.

actual class OnDisconnect
actual class OnDisconnect
actual class OnDisconnect
Link copied to clipboard

The SDK's property name annotation; kotlinx.serialization.SerialName names a property on every platform.

Link copied to clipboard
actual open class Query
actual open class Query
expect open class Query

A read of a location with ordering and filtering, as the Android SDK's Query. Listeners are called on the thread the platform SDK delivers events on. keepSynced is in nonJsMain (the JS SDK has no equivalent).

actual open class Query
actual open class Query
actual open class Query
Link copied to clipboard
actual class ServerValue
expect class ServerValue

Values the server computes on write, as the Android SDK's ServerValue; each is written like any other value.

actual class ServerValue
actual class ServerValue

The server values as the .sv maps the platform SDKs and the backend understand.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ThrowOnExtraProperties

The SDK's annotation; com.google.firebase.serialization.ThrowOnExtraProperties is read on every platform.

Link copied to clipboard
actual class Transaction
expect class Transaction

A transaction on a location, as the Android SDK's Transaction: Handler.doTransaction returns success or abort.

actual class Transaction
actual class Transaction
Link copied to clipboard

Receives the data at a location and its changes; see Query.addValueEventListener.

Properties

Link copied to clipboard

The changes to the children of this location as a Flow, which fails if the listener is cancelled.

Link copied to clipboard
val <Error class: unknown class>.database: FirebaseDatabase

The FirebaseDatabase of the default FirebaseApp; the Android SDK's Firebase.database.

Link copied to clipboard

The data at this location and every change to it as a Flow, which fails if the listener is cancelled.

Functions

Link copied to clipboard
fun <Error class: unknown class>.database(app: <Error class: unknown class>): FirebaseDatabase
fun <Error class: unknown class>.database(url: String): FirebaseDatabase

The FirebaseDatabase of the default FirebaseApp at url.

fun <Error class: unknown class>.database(app: <Error class: unknown class>, url: String): FirebaseDatabase
Link copied to clipboard
inline fun <T> DataSnapshot.getValue(): T?

The SDK's reified getValue, which maps a class by reflection on Android: deprecated with an error towards com.google.firebase.serialization.getValue, which maps through FirebaseFormat.Database on every platform (see DatabaseMapping.kt for why it lives in that package).

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

The SDK's reified getValue (see DataSnapshot.getValue); deprecated towards com.google.firebase.serialization.getValue.

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

The SDK's values flow (see DataSnapshot.getValue); deprecated towards com.google.firebase.serialization.values.