Firebase数据库请求和查询,例如SQL WHERE IN [英] Firebase database requests and queries like SQL WHERE IN

查看:90
本文介绍了Firebase数据库请求和查询,例如SQL WHERE IN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Firebase的新手,我有几个问题..我在旧帖子中发现了一些信息,但很遗憾,这些信息太旧了,无法将其视为有效信息(可追溯至2013年).

I am new to firebase and I have a couple of questions.. I found some information in old posts but unfortunately are too old to consider them as valid (dated back to 2013).

每个客户的请求数:

我什至不确定我要问什么. 我读到某个地方说Firebase每个客户端每秒允许10个请求.我再也找不到此信息,并且在firebase网站上也没有提及..是否存在请求限制"之类的东西?

I am not even sure what I am asking.. I read somewhere that Firebase allows 10 requests per second per client. I cannot find this information anymore and in the firebase website is not mentioned in any way.. Is there such a thing as "requests limit"?

如果我们假设存在此限制,并且允许的请求数为10.那么什么被视为请求?

If we assume that this limitation exists and the number of allowed requests is 10.. then what is considered as a request?

仅当我第一次打开应用程序时才连接到数据库吗?是我执行的每个选择查询吗?有听众会花费请求吗?

Is it a request only when I connect to the database for the first time I open my application? Is it every single select query I perform? Does having listeners spend requests?

我发现自己需要运行一个查询,这种查询在SQL中是这样的: 从ID IN(id1,id2,id7,id200,id143)的表中选择*

I found myself a case where I need to run a query which in SQL would be like: Select * from table where id IN (id1,id2,id7, id200, id143 )

我可以在Firebase中这样做吗?

Can I do that in Firebase?

还是我必须做5个不同的选择查询?如果是后者,那么将它们视为5个不同的请求吗?

Or I have to do 5 different select queries? If the latter is the case, then are they considered as 5 different requests?

在另一个stackoverflow帖子中提到了一个描述此问题的好例子,该应用程序获取用户的facebook列表,并需要根据facebook ids检查其中哪些朋友已经是Firebase应用程序的成员( 2013 ..建议的链接指向旧的Firebase网站,该网站已无法使用..).

One good example describing this problem was mentioned in an other stackoverflow post where the application fetches the facebook list of the user and needs to check which of these friends are already members to the firebase application based on the facebook ids(old question of 2013.. suggested links pointed to the old firebase site which does not work anymore..).

应该如何解决这样的问题?

How a problem like that should be approached?

非常感谢您.

推荐答案

否,firebase没有请求限制,并且既不是IN或OR SQL类运算符.这就是为什么您不必担心要查询的每个值都需要一个请求的原因.

No, firebase does not have a request limit and neither a IN or OR SQL-like operator. And thats the reason why you don't have to be concerned on doing one request for each value you are querying.

确保您在应用程序中异步触发此查询,并且一切都会好起来. Firebase旨在处理所需的并发请求.

Make sure you are triggering this queries asynchronously in your application and you will be fine. Firebase was built to handle as much simultaneous request as needed.

您可以在定价会话中找到firebase免费计划的限制.

You can find firebase free-plan limitations in the pricing session.

这篇关于Firebase数据库请求和查询,例如SQL WHERE IN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆