Package | com.distriqt.extension.firebase.database.builders |
Class | public class UpdateChildrenBuilder |
Inheritance | UpdateChildrenBuilder ![]() |
Helper class to construct the correct parameters for passing to the updateChildren
function of a DatabaseReference
instance.
See also
Method | Defined By | ||
---|---|---|---|
Constructor
| UpdateChildrenBuilder | ||
build():Object
Constructs the Object to be used as the parameter for the
updateChildren function. | UpdateChildrenBuilder | ||
update(path:String, value:Object):UpdateChildrenBuilder
Adds an update to this builder for the next build call. | UpdateChildrenBuilder |
UpdateChildrenBuilder | () | Constructor |
public function UpdateChildrenBuilder()
Constructor
build | () | method |
public function build():Object
Constructs the Object
to be used as the parameter for the
updateChildren
function.
Object — Object for the updateChildren function.
|
See also
update | () | method |
public function update(path:String, value:Object):UpdateChildrenBuilder
Adds an update to this builder for the next build
call.
This will overwrite values previously set with the same path
.
Parameters
path:String — The specific relative child key to update
| |
value:Object — The new value for this child. If null this key will be deleted
|
UpdateChildrenBuilder — This instance of the UpdateChildrenBuilder for chaining
|
var ref:DatabaseReference = FirebaseDatabase.service.getReference( "test" ); ref.updateChildren( new UpdateChildrenBuilder() .update( "/children_test/numericValue", 100 ) .update( "/children_test/stringValue", "some value" ) .build() );