Firestore iOS OR query (whereField(“X”, in: [“Y”, “Z”])

China☆狼群 提交于 2020-01-16 20:19:06

问题


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", in: ["Y", "Z"])

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.

What am I doing wrong?


回答1:


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.



来源:https://stackoverflow.com/questions/58990674/firestore-ios-or-query-wherefieldx-in-y-z

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!