【发布时间】:2017-10-01 04:56:48
【问题描述】:
假设我们有简单的数据结构:
"games": {
"{gameId}" {
"title": "Chess",
"playedBy" : {
"{userId}" : true,
"{userId}" : true
}
}
}
只有游戏,每个游戏都有玩过该游戏的用户的数据。现在我想获取指定用户(假设他的 id 是"1234567")没有玩的所有游戏。我必须查询"playedBy" 不包含"1234567" 的游戏。
如何使用 Firebase 实现这一目标?
Firebase 工作的每种语言都会受到赞赏。
【问题讨论】:
-
据我所知,目前 Firebase 中不支持“不等于”运算符。
-
Firebase 只能查询存在的值。见stackoverflow.com/questions/28582223/…
标签: android ios firebase firebase-realtime-database