From 44a08f0220e5a6ce9181a178504e148ee41222f1 Mon Sep 17 00:00:00 2001 From: LKlemens Date: Sat, 10 Feb 2024 12:37:28 +0100 Subject: [PATCH] doc: fix update_all doc (#228) * doc: fix update_all doc * update README --- README.md | 1 + lib/mongo/repo.ex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 051ee5ae..de41a1c4 100644 --- a/README.md +++ b/README.md @@ -1156,6 +1156,7 @@ pip3 install 'mtools[all]' export PATH=to-your-mongodb/bin/:$PATH ulimit -S -n 2048 ## in case of Mac OS X mlaunch init --setParameter enableTestCommands=1 --replicaset --name "rs_1" +mongosh --host localhost:27017 --eval 'rs.initiate({_id: "rs_1", members: [{_id: 0, host: "127.0.0.1:27017"}, {_id: 1, host: "127.0.0.1:27018"}, {_id: 2, host: "127.0.0.1:27019"}]})' mix test --exclude ssl --exclude socket ``` diff --git a/lib/mongo/repo.ex b/lib/mongo/repo.ex index 91346a64..f3c04a40 100644 --- a/lib/mongo/repo.ex +++ b/lib/mongo/repo.ex @@ -373,7 +373,7 @@ defmodule Mongo.Repo do MyApp.Repo.update_all(Post, %{title: "old"}, %{"$set" => %{title: "updated"}}) """ @callback update_all(module :: module(), filter :: BSON.document(), update :: BSON.document(), opts :: Keyword.t()) :: - {:ok, Mongo.UpdateResult.t()} + {:ok, Mongo.result(Mongo.UpdateResult.t())} @doc """ Deletes all documents for the given collection module and filter.