Group constructor

Group({
  1. required dynamic id,
  2. Map<String, Accumulator> fields = const {},
})

Creates $group aggregation stage

Implementation

Group({required id, Map<String, Accumulator> fields = const {}})
    : super(
          'group',
          AEObject({'_id': id is Map<String, dynamic> ? AEObject(id) : id}
            ..addAll(fields)));