Firebase. Database. FirebaseDatabase
The entry point for accessing a FirebaseDatabase.
Summary
The entry point for accessing a FirebaseDatabase. You can get an instance by calling DefaultInstance . To access a location in the database and read or write data, use GetReference()
Properties |
|
|---|---|
App
|
Returns the Firebase.FirebaseApp instance to which this FirebaseDatabase belongs.
|
DefaultInstance
|
static FirebaseDatabase
Gets the instance of FirebaseDatabase for the default Firebase.App.
|
LogLevel
|
|
RootReference
|
Gets a DatabaseReference for the root location of this FirebaseDatabase.
|
Public static functions |
|
|---|---|
GetInstance(FirebaseApp app)
|
Gets an instance of FirebaseDatabase for a specific Firebase.FirebaseApp.
|
Public functions |
|
|---|---|
GetReference(string path)
|
Gets a DatabaseReference for the provided path.
|
GetReferenceFromUrl(Uri url)
|
Gets a DatabaseReference for the provided URL.
|
GetReferenceFromUrl(string url)
|
Gets a DatabaseReference for the provided URL.
|
GoOffline()
|
void
|
GoOnline()
|
void
|
PurgeOutstandingWrites()
|
void
|
Properties
App
FirebaseApp App
Returns the Firebase.FirebaseApp instance to which this FirebaseDatabase belongs.
| Details | |
|---|---|
| Returns |
The Firebase.FirebaseApp instance to which this FirebaseDatabase belongs.
|
DefaultInstance
static FirebaseDatabase DefaultInstance
Gets the instance of FirebaseDatabase for the default Firebase.App.
A FirebaseDatabase instance.
LogLevel
LogLevel LogLevel
RootReference
DatabaseReference RootReference
Gets a DatabaseReference for the root location of this FirebaseDatabase.
A DatabaseReference instance.
Public static functions
GetInstance
FirebaseDatabase GetInstance( FirebaseApp app )
Gets an instance of FirebaseDatabase for a specific Firebase.FirebaseApp.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
A FirebaseDatabase instance.
|
Public functions
GetReference
DatabaseReference GetReference( string path )
Gets a DatabaseReference for the provided path.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
A DatabaseReference pointing to the specified path.
|
GetReferenceFromUrl
DatabaseReference GetReferenceFromUrl( Uri url )
Gets a DatabaseReference for the provided URL.
Gets a DatabaseReference for the provided URL. The URL must be a URL to a path within this FirebaseDatabase. To create a DatabaseReference to a different database, create a Firebase.FirebaseApp with a
object configured with the appropriate database URL.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
A DatabaseReference for the provided URL.
|
GetReferenceFromUrl
DatabaseReference GetReferenceFromUrl( string url )
Gets a DatabaseReference for the provided URL.
Gets a DatabaseReference for the provided URL. The URL must be a URL to a path within this FirebaseDatabase. To create a DatabaseReference to a different database, create a Firebase.FirebaseApp with a
object configured with the appropriate database URL.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
A DatabaseReference for the provided URL.
|
GoOffline
void GoOffline()
Shuts down our connection to the FirebaseDatabase backend until GoOnline() is called.
GoOnline
void GoOnline()
Resumes our connection to the FirebaseDatabase backend after a previous GoOffline() Call.
PurgeOutstandingWrites
void PurgeOutstandingWrites()
The FirebaseDatabase client automatically queues writes and sends them to the server at the earliest opportunity, depending on network connectivity.
The FirebaseDatabase client automatically queues writes and sends them to the server at the earliest opportunity, depending on network connectivity. In some cases (e.g. offline usage) there may be a large number of writes waiting to be sent. Calling this method will purge all outstanding writes so they are abandoned. All writes will be purged, including transactions and DatabaseReference.OnDisconnect() writes. The writes will be rolled back locally, perhaps triggering events for affected event listeners, and the client will not (re-)send them to the Firebase backend.

