本文介绍了iOS - 或在 Firebase 中查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取状态为 memberowner

I want to get all threads where status is member or owner

我知道如何获得任何一个

I know how to get for either one

reference.queryOrdered(byChild: "status").queryEqual(toValue: "owner")

谁能指导我如何拨打 OR 查询电话?

Can anyone guide me how to make OR query call?

推荐答案

您不能在 Firebase 中执行 OR 样式查询.

You can't do OR style queries in Firebase.

您可以通过添加一个附加字段来解决此问题,该字段在 statusmemberowner 时设置,然后对该字段进行查询相反.

You can work around this by adding an additional field that is set whenever status is member or owner, and then querying on that field instead.

这篇关于iOS - 或在 Firebase 中查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 09:22