[FR] Add `SUM` Functionality to AggregateQuerySnapshot
@cherylEnkidu 已经在做这个了。
开始于 2025年3月31日。
评估
这个 Issue 还没有评估数据。
描述
Feature proposal
Firebase Component: Firestore
Hello,
The Firestore C++ SDK currently supports only the count() method in the firebase::firestore::AggregateQuerySnapshot class but lacks a sum() method (and avg()), which is essential for aggregating numeric fields across documents.
Current State
The public functions of AggregateQuerySnapshot are:
count()is_valid()- Assignment operators (
operator=) query()
Reference:
Flutter SDK Implications
This enhancement would also benefit the Flutter SDK, which relies on the Firestore C++ SDK for Windows platform support. For example, in the FlutterFire plugin, unsupported aggregation types like sum currently result in:
...
case AggregateType::sum:
std::cout << "Sum is not supported on C++" << std::endl;
break;
...
Adding sum() to the C++ SDK would also benefit Flutter developers using Firestore on Windows.
Benefits
Implementing a sum() method would:
- Provide access to Firestore's aggregation capabilities in the C++ SDK.
- Support more use cases for C++ and Flutter developers.
Looking forward to hearing thoughts and feedback!
Thanks,
- 主要语言
- C++
- 星标
- 326
- 派生
- 138
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 6
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-cpp-sdk 的其他 Issue
-
new type: question
难度 2/5 1-3 小时 新手友好度 85/100
firebase/firebase-cpp-sdk#1926 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
firebase/firebase-cpp-sdk#1905 · 2 条评论 ·
-
api: firestore
难度 5/5 一周以上 新手友好度 35/100
firebase/firebase-cpp-sdk#1920 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-cpp-sdk#1904 · 1 条评论 ·
-
new type: question
难度 4/5 3-5 天 新手友好度 45/100
firebase/firebase-cpp-sdk#1892 · 1 条评论 ·
查看 firebase/firebase-cpp-sdk 的全部 Issue
相似的 Issue
-
prio:medium status:idea type:feat
难度 2/5 1-3 小时 新手友好度 82/100
-
tests
难度 2/5 1-3 小时 新手友好度 88/100
-
kind/bug needs-sig needs-triage
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 78/100
drogonframework/drogon#2605 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
ArthurSonzogni/FTXUI#1363 ·