【问题标题】:Firestore iOS OR query (whereField("X", in: ["Y", "Z"])Firestore iOS OR 查询(whereField("X", in: ["Y", "Z"])
【发布时间】:2019-11-22 23:36:14
【问题描述】:

根据 firestore documentation(确保代码示例选择 Swift),Firestore iOS SDK 允许 OR 查询。没有OR运算符,但查询语法

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

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

我做错了什么?

【问题讨论】:

    标签: ios swift firebase google-cloud-firestore


    【解决方案1】:

    whereField(_:in:) 查询运算符是在 Firebase iOS SDK 6.12 版中引入的。对于此类信息,请始终查看release notes

    【讨论】:

    • 感谢您的提示。显然,将 Auth 限制为低于 6.0 的版本和低于 4.0 的存储会阻止 Firebase Core 更新到最新版本,尽管我没有为 Firebase Core 设置任何版本限制。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-07
    • 2013-11-29
    • 1970-01-01
    • 2018-01-12
    • 1970-01-01
    相关资源
    最近更新 更多