【发布时间】:2018-10-15 12:48:14
【问题描述】:
我在 Cloud Firestore 中有一个 Collection,它有一定数量的项目,我们称它为 Collection“X”。这个项目的数量将不断变化。在任何给定时间,我都想监听这个Collection 中的项目数,并在基于另一个“集合”的Query 对象上创建几个whereEqualto() 调用,我们称之为“Y”:
Query queryStore = FirebaseFirestore.getInstance()
.collection("Y")
.whereEqualTo(USER_ID_LABEL, "item 1 from X")
.whereEqualTo(USER_ID_LABEL, "item 2 from X")
.whereEqualTo(USER_ID_LABEL, "item 3 from X");
//Could be more than 3, could be less than 3, constantly changing
基本上,whereEqualTo() 的数量是动态的。
这种类型的查询可能吗?
【问题讨论】:
标签: java android firebase google-cloud-firestore