不等于Cloud Firestore查询功能可用于flutter插件吗? [英] Is the not equals cloud firestore query functionality available for flutter plugin?

查看:60
本文介绍了不等于Cloud Firestore查询功能可用于flutter插件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在本月初,firebase团队宣布了

So at the start of this month, the firebase team announced here that the not equals queries are now available but I am not able to find if this is something I can use in flutter as well. If yes, could you please provide the syntax?

谢谢.

推荐答案

更新2020年11月6日:

cloud_firestore 0.14.3现在支持使用 isNotEqualTo 进行!=查询,如

cloud_firestore 0.14.3 now supports != queries using isNotEqualTo as seen in the API documentation for where(). If you are using an old version, you will have to upgrade.

原始答案:

Flutter当前不支持Firestore的不平等查询.如果是这样,您会在 API文档中看到该代码> where 方法.它还需要更新有关查询限制的书面文档.,目前显示为:

Firestore's inequality queries are currently not supported in Flutter. If they were, you would see it in the API documentation for the where method. It would also necessitate an update of the written documentation on query limitations, where it currently says:

Cloud Firestore不支持以下类型的查询:

Cloud Firestore does not support the following types of queries:

带有!=子句的查询.因此,您应该将查询分为大于查询和小于查询.例如,不支持查询子句where("age",isNotEqualTo:30),但是您可以通过组合两个查询来获得相同的结果集,一个查询与where("age",isLessThan:30)和其中有条款where("age",isGreaterThan:30)

Queries with a != clause. In this cause, you should split the query into a greater-than query and a less-than query. For example, the query clause where("age", isNotEqualTo: 30) is not supported, however you can get the same result set by combining two queries, one with the clause where("age", isLessThan: 30) and one with the clause where("age", isGreaterThan: 30)

跟踪此更新的GitHub问题在此处: https://github.com/FirebaseExtended/flutterfire/pull/3748

The GitHub issue tracking this update is here: https://github.com/FirebaseExtended/flutterfire/pull/3748

自11月4日起,此更新已合并并且应出现在发行说明中所述的将来发行版中.

As of Nov 4, the update is merged and should appear in a future release described in the release notes.

这篇关于不等于Cloud Firestore查询功能可用于flutter插件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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