【发布时间】:2021-09-18 05:02:07
【问题描述】:
像这样从firestore中过滤文档是否会按集合中的文档数或返回的文档数来计算,假设我在集合中有1000个文档并像这样过滤数据以获得20个文档,则被认为是1000个阅读或20个读书?
final ordersRef = firestore.collection("orders");
var query =
ordersRef.snapshots().map((snapshot) => snapshot.docs.where((doc) {
DateTime orderDate = DateTime.parse(doc["ordered_at"]);
return unifyDateFormat(previousDay)
.isBefore(unifyDateFormat(orderDate)) &&
unifyDateFormat(nextDay).isAfter(unifyDateFormat(orderDate));
}));
【问题讨论】:
标签: firebase flutter dart google-cloud-firestore