Mongo.Repo.update_all
You're seeing just the callback
update_all
, go back to Mongo.Repo module for more information.
Specs
update_all( module :: module(), filter :: BSON.document(), update :: BSON.document(), opts :: Keyword.t() ) :: {:ok, Mongo.UpdateResult.t()}
Applies the updates for the documents in the given collection module and filter.
Uses MongoDB update operators to specify the updates. For more information and all options please refer to the MongoDB documentation
Example
MyApp.Repo.update_all(Post, %{}, %{"$set" => %{title: "updated"}})
MyApp.Repo.update_all(Post, %{title: "old"}, %{"$set" => %{title: "updated"}})