考虑采用下列火种结构:
{
"users" : {
"00:03:aa:dc:1c:2b" : {
"firstName" : " Ofek",
"groupName" : "thailand",
"lastName" : "Ron",
"registration" : {
"type" : "regular",
"time" : 1418288589636
},
"phoneNumber" : "345345345"
},
"04:46:65:8D:60:C6" : {
"firstName" : " Ofek",
"groupName" : "thailand",
"lastName" : "Ron",
"registration" : {
"type" : "regular",
"time" : 1418288589630
},
"phoneNumber" : "345345345"
},
}
}如何实现以下查询:
SELECT * FROM USERS WHERE groupName="thailand" and registration.time>=1418288589631我试着这样做:
fireBase.orderByChild("groupName").startAt("thailand").endAt("thailand").orderByChild("time").startAt("1418288589631")但这造成了一个例外,因为火力基地不允许多个秩序.
有什么想法吗?
发布于 2015-03-07 01:19:26
当前,每个查询只支持一个orderBy。
因此,如果要对多个属性进行筛选(或排序),则必须在JavaScript代码中执行额外的筛选(或排序)客户端,或者必须提出合并属性的自己的索引方案。
https://stackoverflow.com/questions/27432030
复制相似问题