Sort constructor

Sort(
  1. Map<String, dynamic> specification
)

Creates $sort aggregation stage

specification - a document that specifies the field(s) to sort by and the respective sort order. Sort order can have one of the following values:

  • 1 to specify ascending order.
  • -1 to specify descending order.

Implementation

Sort(Map<String, dynamic> specification)
    : super('sort', AEObject(specification));