用于检索所有用户的 where 子句

Where clause to retrieve all users

本文关键字:where 子句 用户 检索 用于      更新时间:2023-09-26

我刚刚开始使用Firebase。 我的问题是关于"哪里"子句。

我得到了一些数据(json):

Users
|
|_____ John
|        |___ name: John Farmer
|        |___ searchingForGame: true
|
|_____ James
|        |___ name: James Smith
|        |___ searchingForGame: false
|
|_____ Barbara
         |___ name: Barbara Smith
         |___ searchingForGame: true

我想检索所有用户WHERE searchingForGame = true

知道吗?

Firebase不像SQL那样工作,你需要完全不同的方法来接近它。我真诚地建议先通读他们的文档,这非常好!此链接应至少回答您的部分问题:https://www.firebase.com/docs/web/guide/retrieving-data.html