firebase - Flutter Firestore where子句使用map
问题描述
发布新活动时,我将新的发布文档添加到集合中。在这个文档中,我有一张地图,用户可以在其中添加对事件的确认,将其标记为真实并添加他自己的 ID。
var snap = await Firestore.instance
.collection('user_posts')
.where("confirmations.${user.id}",isEqualTo: true)
.getDocuments();
有了这个片段,我可以得到用户确认的所有帖子。这里的问题是要获得这个索引来执行这个查询。而且这个索引不能是通用的。我无法为每个用户创建索引。
一些想法如何得到它?
谢谢!!
解决方案
推荐阅读
- r - 在 Shiny Server 中创建函数,使用 UI(input$NAME) 作为函数的输入
- python - 根据给定的界限自动填充积分方程
- sql - 具有公共字段值的其他行上的 SQL 计数出现次数
- vue.js -
切换到其他组件时不保持文件名可见 - apache-nifi - 一个 NiFi 节点可以有多个主机名吗?
- c# - 实体框架和使用特定数据库
- javascript - 我的代码不允许用户退出,我的答案不能正常工作,我的 .toLowerCase() 也不能,它也进入了一个无限循环
- reactjs - React 使用 React Helmet 在特定页面上更改导航栏颜色?
- cuda - 使用 CUDA 原子操作和网格同步处理共享工作队列
- c - 如何使用 lldb 在函数中查找静态变量?