google-cloud-firestore - Firestore - 如何做一个 "reverse"数组包含?

标签 google-cloud-firestore

我在 firestore 中有一个用户集合,其中一个字段是“contact_person”。

然后我在我的前端有一个数组 arrNames {'Jim', 'Danny', 'Rachel'} 我想获得在他们的“contact_person”字段中具有这些名称之一的所有用户。 类似where("contact_person"IN arrNames)

我该怎么做?

最佳答案

目前这在 Firestore API 中是不可能的。您将需要为每个文档执行单独的获取,除非名称恰好在一个连续的范围内。

另见:

关于google-cloud-firestore - Firestore - 如何做一个 "reverse"数组包含?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54453341/

相关文章:

node.js - 对于此用例,最有效的 Firestore 模型是什么?

firebase - 子集合的 Cloud Firestore 规则

firebase - 带有 Flutter 的 Firebase 中的唯一用户名

c# - 如何使用 .net 核心连接到 Cloud Firestore DB?

javascript - 无法使用 firebase.firestore.FieldValue.increment

react-native - redux-persist/createPersistoid : error serializing state TypeError: Converting circular structure to JSON

angular - 如何从 angularfire2 创建 GeoPoint?

javascript - Firebase firestore.doc 不返回数据

Firestore 的 Firebase 分析器

flutter - 从Flutter中的Firestore检索数据后为空列表