Firestore iOS OR查询(whereField("X",在[[Y],"Z"]]中) [英] Firestore iOS OR query (whereField("X", in: ["Y", "Z"])

查看:33
本文介绍了Firestore iOS OR查询(whereField("X",在[[Y],"Z"]]中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Firestore 文档(请确保选择Swift(针对代码示例),Firestore iOS SDK允许进行OR查询.没有OR运算符,但是查询语法

According to the firestore documentation (make sure to select Swift for the code examples), Firestore iOS SDK allows OR queries. There is no OR operator, but the query syntax

ref.whereField("X",在:["Y","Z"])

应实现相同的目的.但是,尽管我使用的是iOS(1.2.1)和FirebaseCore(5.4.1)的最新版本的Firestore,但似乎不支持此语法.

should fulfil the same purpose. However, although I'm using the latest version of Firestore for iOS (1.2.1) and FirebaseCore (5.4.1) this syntax does not seem to be supported.

我在做什么错了?

推荐答案

Firebase iOS SDK版本6.12中引入了 whereField(_:in:)查询运算符.对于此类信息,请始终查看发行说明.

The whereField(_:in:) query operator was introduced in version 6.12 of the Firebase iOS SDK. For this type of information, always check the release notes.

这篇关于Firestore iOS OR查询(whereField("X",在[[Y],"Z"]]中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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