mongodb :: MongoGroup :: first
https://docs.mongodb.com/manual/reference/operator/aggregation/first/
{ $first: <expression> }
Returns the value that results from applying an expression to the first document in a group of documents that share the same group by key.
Only meaningful when documents are in a defined order.
# Return the first value
#
# https://docs.mongodb.com/manual/reference/operator/aggregation/first/
#
# ~~~json
# { $first: <expression> }
# ~~~
#
# Returns the value that results from applying an expression to the first
# document in a group of documents that share the same group by key.
#
# Only meaningful when documents are in a defined order.
fun first(field: String, expression: Serializable): MongoGroup do
return acc("first", field, expression)
end
lib/mongodb/queries.nit:604,2--618,4