Details | |
---|---|
Returns | The Database object for this reference. |
stringKey
The last token in the location pointed to by this reference
DatabaseReferenceParent
A DatabaseReference to the parent location, or null if this instance references the root location.
DatabaseReferenceChild(stringpathString)
Get a reference to location relative to this one
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | A new DatabaseReference to the given path |
overrideboolEquals(objectother)
Returns true if both objects reference the same database path.
overrideintGetHashCode()
A hash code based on the string path of the reference.
OnDisconnectOnDisconnect()
Provides access to disconnect operations at this location
Details | |
---|---|
Returns | An object for managing disconnect operations at this location |
DatabaseReferencePush()
Create a reference to an auto-generated child location.
Create a reference to an auto-generated child location. The child key is generated client-side and incorporates an estimate of the server's time for sorting purposes. Locations generated on a single client will be sorted in the order that they are created, and will be sorted approximately in order across all clients.
Details | |
---|---|
Returns | A DatabaseReference pointing to the new location |
TaskRemoveValueAsync()
Set the value at this location to 'null'
Details | |
---|---|
Returns | The Task{TResult} for this operation. |
Task<DataSnapshot>RunTransaction(Func<MutableData,TransactionResult>transaction)
Run a transaction on the data at this location.
A transaction is a data transformation function that is continually attempted until the DatabaseReference location remains unchanged during the operation.
Details | |||
---|---|---|---|
Parameters |
|
Task<DataSnapshot>RunTransaction(Func<MutableData,TransactionResult>transaction,boolfireLocalEvents)
Run a transaction on the data at this location.
A transaction is a data transformation function that is continually attempted until the DatabaseReference location remains unchanged during the operation.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
TaskSetPriorityAsync(objectpriority)
Set a priority for the data at this Database location.
Set a priority for the data at this Database location. Priorities can be used to provide a custom ordering for the children at a location (if no priorities are specified, the children are ordered by key).
You cannot set a priority on an empty location. For this reason setValue(data, priority) should be used when setting initial data with a specific priority and setPriority should be used when updating the priority of existing data.
Children are sorted based on this priority using the following rules:
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | The Task{TResult} for this operation. |
TaskSetRawJsonValueAsync(stringjsonValue)
Set the data at this location to the given string json represenation.
Details | |
---|---|
Returns | The Task{TResult} for this operation. |
TaskSetRawJsonValueAsync(stringjsonValue,objectpriority)
Set the data and priority to the given values.
Details | |
---|---|
Returns | The Task{TResult} for this operation. |
TaskSetValueAsync(objectvalue)
Set the data at this location to the given value.
Set the data at this location to the given value. Passing null to setValue() will delete the data at the specified location. The allowed types are:
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | The Task{TResult} for this operation. |
TaskSetValueAsync(objectvalue,objectpriority)
Set the data and priority to the given values.
Set the data and priority to the given values. Passing null to setValue() will delete the data at the specified location. The allowed types are:
Details | |||||
---|---|---|---|---|---|
Parameters |
| ||||
Returns | The Task{TResult} for this operation. |
overridestringToString()
The full location url for this reference.
TaskUpdateChildrenAsync(IDictionary<string,object>update)
Update the specific child keys to the specified values.
Update the specific child keys to the specified values. Passing null in a map to updateChildren() will Remove the value at the specified location.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | The Task{TResult} for this operation. |
voidGoOffline()
voidGoOnline()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.