firebase实时数据库分页带查询

发布于 2025-02-11 14:37:59 字数 333 浏览 1 评论 0原文

我正在使用unity3d的firatabase。 我的问题是用户搜索数据,我每次仅检索50个结果, 很容易获得第一个50记录,

Database.RootReference.Child("ID").OrderByChild(AppSettings.UserFullNameKeyLowCase).StartAt(_search.ToLower()).LimitToLast(50);

问题是要获得接下来的50个需要多个启动剂,而firebase剂量不支持。

我做了很多研究,似乎不可能直接做到这一点。

我的问题是有任何方法,任何其他或第三方工具可以做到这一点,

I am using Firedatabase with Unity3d.
My Issue is the user search for data, and I retrieve only 50 result each time,
It is easy to get first 50 record

Database.RootReference.Child("ID").OrderByChild(AppSettings.UserFullNameKeyLowCase).StartAt(_search.ToLower()).LimitToLast(50);

The problem is getting the next 50 requires to have multiple StartAt, which firebase dose not support.

I did a lot of research and it seems its impossible to do that in a direct way.

My question Is there any way to do that, any alternative or third party tool to do that,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绮烟 2025-02-18 14:37:59

您需要一次从特定条目中获得50个条目吗?
您可以使用自己的代码获得前50个结果;记录最后一个,并将该变量用作下一个搜索的Startat参数。
您可以每次使用循环来下载下一个50个数据。

Do you need to get 50 entries at a time from a specific entry?
You could use your own code to get the first 50 results; record the last one and use that variable as the StartAt parameter for the next search.
You could use for loops to download the next 50 data each time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文