Mongo.Repo.aggregate

You're seeing just the callback aggregate, go back to Mongo.Repo module for more information.
Link to this callback

aggregate(module, pipeline, opts)

View Source (optional)

Specs

aggregate(module :: module(), pipeline :: BSON.document(), opts :: Keyword.t()) ::
  [
    Mongo.Collection.t()
  ]

Performs aggregation operation using the aggregation pipeline on the given collection module and returns a list of collection structs.

For all options see Options

Example

MyApp.Repo.aggregate(Post, [
  %{"$match" => %{title: title}},
  %{"$sort" => [{"title", -1}]},
  %{"$limit" => 10}
])