![](/img/trans.png)
[英]How do I get list of the document ID's inside a collection without getting the content of the documents in Firestore?
[英]How to get documents from Firestore without a single document id
所以我的 Firestore 中有一个名为 products 的集合,它包含我所有的产品。 由于我使用的是标签小部件,当有多个项目共享同一个标签时,它会给我一个错误。 因此,对于我的 Products Builder,我想提供一个列表,其中包含我所有的产品,而没有他的 id 捕获的特定产品,所以我的 Stream Builder 的 stream 属性可以是这样的。
StreamBuilder(stream: Firestore.instance.collection('products').WITHOUT SPECIFIC PRODUCT ID .snapshot()
builder:...)
我怎样才能做到这一点?
不可能为除一个之外的所有文档构建查询。 Firestore 中没有不等式过滤器。
由于它只是一个文档,因此只需对所有文档进行查询就很有意义,让客户端代码从结果集中删除您不想要的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.