aggregate<TValue extends AsyncAggregateValue> method
Get the number of elements in all collections existing in the database.
AsyncAggregateValue is returned, wait a moment and then retrieve the value from AsyncAggregateValue.value.
Values loaded with load are normally retained, but will be reloaded when reload is executed.
データベース上に存在するすべてのコレクションの要素数を取得します。
AsyncAggregateValueが返されるので少し待ったあとAsyncAggregateValue.valueから値を取得してください。
Implementation
TValue aggregate<TValue extends AsyncAggregateValue>(
ModelAggregateQuery<TValue> query) {
if (_aggregate.containsKey(query)) {
final val = _aggregate[query];
if (val is TValue) {
return val;
}
}
final val = query.onCreate(query, this, notifyListeners);
_aggregate[query] = val;
return val;
}