Note: condition values for the key '_id' will be automatically cast to \MongoId instance,
even if they are plain strings. However, if you have other columns, containing \MongoId, you
should take care of possible typecast on your own.

Column name or list of column names.
If array is given, each element in the array has as key the field name, and as
value either 1 for ascending sort, or -1 for descending sort.
You can specify field using native numeric key with the field name as a value,
in this case ascending sort will be used.
For example:

Column name or list of column names.
If array is given, each element in the array has as key the field name, and as
value either 1 for ascending sort, or -1 for descending sort.
Use value 'text' to specify text index.
You can specify field using native numeric key with the field name as a value,
in this case ascending sort will be used.
For example:

Fields to group by. If an array or non-code object is passed,
it will be the key used to group results. If instance of \MongoCode passed,
it will be treated as a function that returns the key to group by.

Output collection name. It could be a string for simple output
('outputCollection'), or an array for parametrized output (['merge' => 'outputCollection']).
You can pass ['inline' => true] to fetch the result at once without temporary collection usage.