如何编写firebase的同步查询调用? [英] how to write synchronous query call for firebase?

查看:118
本文介绍了如何编写firebase的同步查询调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我的数据执行同步查询,如何在firebase中执行此操作?我可以找到异步调用块的方法。请引导我。

解决方案

Firebase是一个云托管的数据库。这意味着要从数据库获取数据需要通过网络建立(或发送数据)。由于这个原因,没有办法从Firebase同步加载数据。



如果您想要解决这个问题,请查看以下问题:强制异步Firebase查询同步执行?。但是我高度推荐您使用Firebase的异步特性。您的用户将不胜感激。


I need to perform synchronous query for my data , how to do that in firebase? I can find method with block which is asynchronous call. Please guid me.

解决方案

Firebase is a cloud-hosted database. This means that to get data from the database requires establishing (or sending data) over the network. For this reason there is no method to synchronously load data from Firebase.

If you feel like working around this, have a look at this question: Force asynchrounous Firebase query to execute synchronously?. But I highly recommend that you embrace the asynchronous nature of using Firebase. Your users will be grateful if you do.

这篇关于如何编写firebase的同步查询调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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