RuleDataSnapshot
Presentation
This is the object type of predefined variables data
,newData
and root
.
Methods
val()
- No argument
- return value: the value (
Number
,Boolean
,String
orNull
)
child()
- Arguments:
childPath
:String
- return value: a
RuleDataSnapshot
at subPathchildPath
parent()
- No argument
- return value: a
RuleDataSnapshot
for parent path
hasChild()
- Arguments:
childPath
:String
- return value: a
boolean
indicating 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
boolean
indicating 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
boolean
indicating this path exists (ie. if thisRuleDataSnapshot
is not null)
isNumber()
- No argument
- return value: a
boolean
indicating if the data is a number
isString()
- No argument
- return value: a
boolean
indicating if the data is a string
isBoolean()
- No argument
- return value: a
boolean
indicating if the data is a boolean