DatabaseKt
public final class DatabaseKt
Summary
Public fields |
|
|---|---|
final @NonNull Flow<@NonNull ChildEvent> |
Starts listening to this query's child events and emits its values via a |
final @NonNull FirebaseDatabase |
Returns the |
final @NonNull Flow<@NonNull DataSnapshot> |
Starts listening to this query and emits its values via a |
Public methods |
|
|---|---|
static final @NonNull FirebaseDatabase |
DatabaseKt.database(@NonNull Firebase receiver, @NonNull FirebaseApp app)Returns the |
static final @NonNull FirebaseDatabase |
Returns the |
static final @NonNull FirebaseDatabase |
DatabaseKt.database(Returns the |
static final T |
<T extends Object> DatabaseKt.getValue(@NonNull DataSnapshot receiver)Returns the content of the DataSnapshot converted to a POJO. |
static final T |
<T extends Object> DatabaseKt.getValue(@NonNull MutableData receiver)Returns the content of the MutableData converted to a POJO. |
static final @NonNull Flow<T> |
<T extends Object> DatabaseKt.values(@NonNull Query receiver)Starts listening to this query and emits its values converted to a POJO via a |
Public fields
childEvents
public final @NonNull Flow<@NonNull ChildEvent> childEvents
Starts listening to this query's child events and emits its values via a Flow.
-
When the returned flow starts being collected, a
ChildEventListenerwill be attached. -
When the flow completes, the listener will be removed.
database
public final @NonNull FirebaseDatabase database
Returns the FirebaseDatabase instance of the default FirebaseApp.
snapshots
public final @NonNull Flow<@NonNull DataSnapshot> snapshots
Starts listening to this query and emits its values via a Flow.
-
When the returned flow starts being collected, a
ValueEventListenerwill be attached. -
When the flow completes, the listener will be removed.
Public methods
DatabaseKt.database
public static final @NonNull FirebaseDatabase DatabaseKt.database(@NonNull Firebase receiver, @NonNull FirebaseApp app)
Returns the FirebaseDatabase instance of the given FirebaseApp.
DatabaseKt.database
public static final @NonNull FirebaseDatabase DatabaseKt.database(@NonNull Firebase receiver, @NonNull String url)
Returns the FirebaseDatabase instance for the specified url.
DatabaseKt.database
public static final @NonNull FirebaseDatabase DatabaseKt.database(
@NonNull Firebase receiver,
@NonNull FirebaseApp app,
@NonNull String url
)
Returns the FirebaseDatabase instance of the given FirebaseApp and url.
DatabaseKt.getValue
public static final T <T extends Object> DatabaseKt.getValue(@NonNull DataSnapshot receiver)
Returns the content of the DataSnapshot converted to a POJO.
Supports generics like List<> or Map<>. Use @JvmSuppressWildcards to force the compiler to use the type T, and not ? extends T.
DatabaseKt.getValue
public static final T <T extends Object> DatabaseKt.getValue(@NonNull MutableData receiver)
Returns the content of the MutableData converted to a POJO.
Supports generics like List<> or Map<>. Use @JvmSuppressWildcards to force the compiler to use the type T, and not ? extends T.
DatabaseKt.values
public static final @NonNull Flow<T> <T extends Object> DatabaseKt.values(@NonNull Query receiver)
Starts listening to this query and emits its values converted to a POJO via a Flow.
-
When the returned flow starts being collected, a
ValueEventListenerwill be attached. -
When the flow completes, the listener will be removed.