Output constructor

Output(
  1. String fieldName,
  2. Accumulator operator, {
  3. List? documents,
  4. List? range,
  5. String? unit,
})

Implementation

Output(String fieldName, Accumulator operator,
    {List? documents, List? range, String? unit})
    : super.internal(({
        fieldName: {
          ...operator.build(),
          if (documents != null || range != null || unit != null)
            spWindow: {
              if (documents != null) spDocuments: AEList(documents),
              if (range != null) spRange: AEList(range),
              if (unit != null) spUnit: unit
            }
        }
      }));