在Firebase数据库中考虑以下JSON格式 -
"root":
{
"question":
{
"1":
{
"category":"A",
"replies":0
},
"2":
{
"category":"B",
"replies":1
},
"3":
{
"category":"B",
"replies":0
},
"4":
{
"category":"C",
"replies":2
}
}
}
要获得回复所有问题= 0,我这样做,
Query query = rootReference.child("question").orderByChild("replies").equalTo(0);
完美无缺。
但如果我希望这些问题的回复不等于0,我该怎么办?