简体   繁体   English

如何在 Firebase Android 中使用多个 WhereIn 查询?

[英]How to use Multiple WhereIn queries in Firebase Android?

I'm working on an app where I'm using Cloud Firestore, at times I need to use multiple whereIn() queries but it's not working.我正在开发一个使用 Cloud Firestore 的应用程序,有时我需要使用多个whereIn()查询,但它不起作用。 Is there any way I can use multiple wherein queries or I can compare multiple list values?有什么方法可以使用多个 where 查询或者我可以比较多个列表值?

is there any way I can use multiple wherein queries or I can compare multiple list values有什么方法可以使用多个 where 查询或者我可以比较多个列表值

No, there is not.不,那里没有。 Please read the documentation on query limitations :请阅读有关查询限制的文档:

Note the following limitations for in, not-in, and array-contains-any:请注意 in、not-in 和 array-contains-any 的以下限制:

  • You can use at most one in, not-in, or array-contains-any clause per query.每个查询最多可以使用一个 in、not-in 或 array-contains-any 子句。 You can't combine these operators in the same query.您不能在同一个查询中组合这些运算符。

Instead, you can use a single whereIn filter, then filter the remaining results on the client app.相反,您可以使用单个 whereIn 过滤器,然后在客户端应用程序上过滤剩余的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM