RuleDataSnapshot
Presentation
This is the object type of predefined variables data,newData and root.
Methods
val()
- No argument
- return value: the value (
Number,Boolean,StringorNull)
child()
- Arguments:
childPath:String
- return value: a
RuleDataSnapshotat subPathchildPath
parent()
- No argument
- return value: a
RuleDataSnapshotfor parent path
hasChild()
- Arguments:
childPath:String
- return value: a
booleanindicating if a child at that subpath exists (and is not null, which is the same for webcom)
hasChildren()
- Arguments:
- (optionnal)
children: array ofString
- (optionnal)
- return value: a
booleanindicating if children at that path exists
If no argument is provided, it returns true if at least one child exists.
If an array is provided, it returns true if all children in array exist.
exists()
- No argument
- return value: a
booleanindicating this path exists (ie. if thisRuleDataSnapshotis not null)
isNumber()
- No argument
- return value: a
booleanindicating if the data is a number
isString()
- No argument
- return value: a
booleanindicating if the data is a string
isBoolean()
- No argument
- return value: a
booleanindicating if the data is a boolean