根据firestore documentation (确保为代码示例选择 Swift),Firestore iOS SDK 允许 OR 查询。没有OR运算符,但是查询语法
ref.whereField("X", in: ["Y", "Z"])
应该达到同样的目的。 但是,尽管我使用的是最新版本的 iOS 版 Firestore (1.2.1) 和 FirebaseCore (5.4.1),但似乎不支持此语法。
我做错了什么?
最佳答案
whereField(_:in:)
查询运算符是在 Firebase iOS SDK 6.12 版中引入的。对于此类信息,请始终查看 release notes .
关于ios - Firestore iOS 或查询(whereField ("X",在 : ["Y", "Z"]),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58990674/