mongodb :: MongoGroup :: addToSet
https://docs.mongodb.com/manual/reference/operator/aggregation/addToSet/
{ $addToSet: <expression> }
Returns an array of all unique values that results from applying an expression to each document in a group of documents that share the same group by key.
Order of the elements in the output array is unspecified.
# Push to a unique array
#
# https://docs.mongodb.com/manual/reference/operator/aggregation/addToSet/
#
# ~~~json
# { $addToSet: <expression> }
# ~~~
#
# Returns an array of all unique values that results from applying an
# expression to each document in a group of documents that share the same
# group by key.
#
# Order of the elements in the output array is unspecified.
fun addToSet(field: String, expr: Serializable): MongoGroup do
return acc("addToSet", field, expr)
end
lib/mongodb/queries.nit:650,2--665,4