File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,13 @@ AggregateQuery QueryInternal::Count() const {
162
162
return firestore_->NewAggregateQuery (env, aggregate_query);
163
163
}
164
164
165
+ AggregateQuery QueryInternal::Aggregate (const FieldPath& field) const {
166
+ Env env = GetEnv ();
167
+ Local<Object> java_field = FieldPathConverter::Create (env, field);
168
+ Local<Object> aggregate_query = env.Call (obj_, kAggregate , java_field);
169
+ return firestore_->NewAggregateQuery (env, aggregate_query);
170
+ }
171
+
165
172
Query QueryInternal::Where (const firebase::firestore::Filter& filter) const {
166
173
Env env = GetEnv ();
167
174
Local<Object> query = env.Call (obj_, kWhere , filter.internal_ ->ToJava ());
Original file line number Diff line number Diff line change @@ -71,6 +71,15 @@ class QueryInternal : public Wrapper {
71
71
*/
72
72
virtual AggregateQuery Count () const ;
73
73
74
+ /* *
75
+ * @brief Returns a query that calculates the specified aggregation over the
76
+ * documents in the result set of this query.
77
+ *
78
+ * @param[in] aggregate_field The aggregation field.
79
+ * @return An aggregate query that performs the specified aggregation.
80
+ */
81
+ virtual AggregateQuery Aggregate (const AggregateField& aggregate_field) const ;
82
+
74
83
/* *
75
84
* @brief Creates and returns a new Query with the additional filter.
76
85
*
You can’t perform that action at this time.
0 commit comments