Stay organized with collections
Save and categorize content based on your preferences.
Firebase.Database.MutableData
Instances of this class encapsulate the data and priority at a location.
Summary
Instances of this class encapsulate the data and priority at a location. It is used in transactions, and it is intended to be inspected and then updated to the desired data at that location.
Note that changes made to a child MutableData instance will be visible to the parent and vice versa.
Properties
|
Children
|
Used to iterate over the immediate children at this location
|
ChildrenCount
|
long
The number of immediate children at this location.
|
HasChildren
|
bool
True if the data at this location has children, false otherwise.
|
Key
|
string
The key name of this location, or null if it is the top-most location.
|
Priority
|
object
Gets the current priority at this location.
|
Value
|
object
getValue() returns the data contained in this instance as native types.
|
Public functions
|
Child(string path)
|
Used to obtain a MutableData instance that encapsulates the data and priority at the given relative path.
|
Equals(object o)
|
override bool
Two MutableData are considered equal if they contain the same references and priority.
|
GetHashCode()
|
override int
Overriden to ensure two objects that are Equal have the same hash.
|
HasChild(string path)
|
bool
Determines if data exists at the given path.
|
ToString()
|
override string
Representation of the mutable data as a string containing a key, value pair.
|
Properties
Children
IEnumerable< MutableData > Children
Used to iterate over the immediate children at this location
Used to iterate over the immediate children at this location
Details |
Returns
|
The immediate children at this location
|
ChildrenCount
long ChildrenCount
The number of immediate children at this location.
HasChildren
bool HasChildren
True if the data at this location has children, false otherwise.
Key
string Key
The key name of this location, or null if it is the top-most location.
Priority
object Priority
Gets the current priority at this location.
Gets the current priority at this location. The possible return types are:
Note that null is allowed
Details |
Returns
|
The priority at this location as a native type
|
Value
object Value
getValue() returns the data contained in this instance as native types.
getValue() returns the data contained in this instance as native types. The possible types returned are:
- bool
- string
- long
- double
- IDictionary{string, object}
- List{object} This list is recursive; the possible types for object in the above list is given by the same list. These types correspond to the types available in JSON.
Details |
Returns
|
The data contained in this instance as native types
|
Public functions
Child
MutableData Child(
string path
)
Used to obtain a MutableData instance that encapsulates the data and priority at the given relative path.
Details |
Parameters |
|
Returns
|
An instance encapsulating the data and priority at the given path
|
Equals
override bool Equals(
object o
)
Two MutableData are considered equal if they contain the same references and priority.
GetHashCode
override int GetHashCode()
Overriden to ensure two objects that are Equal have the same hash.
HasChild
bool HasChild(
string path
)
Determines if data exists at the given path.
Details |
Parameters |
|
Returns
|
True if data exists at the given path, otherwise false
|
ToString
override string ToString()
Representation of the mutable data as a string containing a key, value pair.
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 2021-06-17 UTC.
[null,null,["Last updated 2021-06-17 UTC."],[],[],null,["# Firebase.Database.MutableData Class Reference\n\nFirebase.Database.MutableData\n=============================\n\nInstances of this class encapsulate the data and priority at a location.\n\nSummary\n-------\n\nInstances of this class encapsulate the data and priority at a location. It is used in transactions, and it is intended to be inspected and then updated to the desired data at that location. \n\n\nNote that changes made to a child [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) instance will be visible to the parent and vice versa.\n\n| ### Properties ||\n|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Children](#class_firebase_1_1_database_1_1_mutable_data_1a3af42366ee4142bc0dc9be76877bbfd7) | `IEnumerable\u003c `[MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data)` \u003e` Used to iterate over the immediate children at this location |\n| [ChildrenCount](#class_firebase_1_1_database_1_1_mutable_data_1a09809a3baa7b1c7dd9afb677039bd4a7) | `long` The number of immediate children at this location. |\n| [HasChildren](#class_firebase_1_1_database_1_1_mutable_data_1a850fef27efd55f6da96848af871ebaa5) | `bool` True if the data at this location has children, false otherwise. |\n| [Key](#class_firebase_1_1_database_1_1_mutable_data_1a4bd529dad6d9751d1e73c35a429278cf) | `string` The key name of this location, or null if it is the top-most location. |\n| [Priority](#class_firebase_1_1_database_1_1_mutable_data_1a60cac0feb484161401f7de6b064bda75) | `object` Gets the current priority at this location. |\n| [Value](#class_firebase_1_1_database_1_1_mutable_data_1a4833f23246b3079078332d57c5649254) | `object` getValue() returns the data contained in this instance as native types. |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Child](#class_firebase_1_1_database_1_1_mutable_data_1a3065ae4bbf06e227705dfbe8f423cea2)`(string path)` | [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) Used to obtain a [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) instance that encapsulates the data and priority at the given relative path. |\n| [Equals](#class_firebase_1_1_database_1_1_mutable_data_1a996f7674bf97a1d23478155d085374a2)`(object o)` | `override bool` Two [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) are considered equal if they contain the same references and priority. |\n| [GetHashCode](#class_firebase_1_1_database_1_1_mutable_data_1ab29f86d675a6e280c83970e0cf9b0b6c)`()` | `override int` Overriden to ensure two objects that are Equal have the same hash. |\n| [HasChild](#class_firebase_1_1_database_1_1_mutable_data_1a5794c7413ffc9a8552334d187b958a26)`(string path)` | `bool` Determines if data exists at the given path. |\n| [ToString](#class_firebase_1_1_database_1_1_mutable_data_1a39255e13dd3fe6458151eb8fcb883837)`()` | `override string` Representation of the mutable data as a string containing a key, value pair. |\n\nProperties\n----------\n\n### Children\n\n```c#\nIEnumerable\u003c MutableData \u003e Children\n``` \nUsed to iterate over the immediate children at this location\n\nUsed to iterate over the immediate children at this location\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------|\n| **Returns** | The immediate children at this location |\n\n### ChildrenCount\n\n```c#\nlong ChildrenCount\n``` \nThe number of immediate children at this location. \n\n### HasChildren\n\n```c#\nbool HasChildren\n``` \nTrue if the data at this location has children, false otherwise. \n\n### Key\n\n```c#\nstring Key\n``` \nThe key name of this location, or null if it is the top-most location. \n\n### Priority\n\n```c#\nobject Priority\n``` \nGets the current priority at this location.\n\nGets the current priority at this location. The possible return types are:\n\n- Double\n- String\n\nNote that null is allowed\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|------------------------------------------------|\n| **Returns** | The priority at this location as a native type |\n\n### Value\n\n```c#\nobject Value\n``` \ngetValue() returns the data contained in this instance as native types.\n\ngetValue() returns the data contained in this instance as native types. The possible types returned are:\n\n- bool\n- string\n- long\n- double\n- IDictionary{string, object}\n- List{object} This list is recursive; the possible types for object in the above list is given by the same list. These types correspond to the types available in JSON.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------------------|\n| **Returns** | The data contained in this instance as native types |\n\nPublic functions\n----------------\n\n### Child\n\n```c#\nMutableData Child(\n string path\n)\n``` \nUsed to obtain a [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) instance that encapsulates the data and priority at the given relative path.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------|\n| Parameters | |--------|-----------------| | `path` | A relative path | |\n| **Returns** | An instance encapsulating the data and priority at the given path |\n\n### Equals\n\n```c#\noverride bool Equals(\n object o\n)\n``` \nTwo [MutableData](/docs/reference/unity/class/firebase/database/mutable-data#class_firebase_1_1_database_1_1_mutable_data) are considered equal if they contain the same references and priority. \n\n### GetHashCode\n\n```c#\noverride int GetHashCode()\n``` \nOverriden to ensure two objects that are Equal have the same hash. \n\n### HasChild\n\n```c#\nbool HasChild(\n string path\n)\n``` \nDetermines if data exists at the given path.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------------------------|\n| Parameters | |--------|-----------------| | `path` | A relative path | |\n| **Returns** | True if data exists at the given path, otherwise false |\n\n### ToString\n\n```c#\noverride string ToString()\n``` \nRepresentation of the mutable data as a string containing a key, value pair."]]