Skip to content

Commit 44a08f0

Browse files
authored
doc: fix update_all doc (#228)
* doc: fix update_all doc * update README
1 parent 9d13924 commit 44a08f0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,7 @@ pip3 install 'mtools[all]'
11561156
export PATH=to-your-mongodb/bin/:$PATH
11571157
ulimit -S -n 2048 ## in case of Mac OS X
11581158
mlaunch init --setParameter enableTestCommands=1 --replicaset --name "rs_1"
1159+
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"}]})'
11591160
mix test --exclude ssl --exclude socket
11601161
```
11611162

lib/mongo/repo.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ defmodule Mongo.Repo do
373373
MyApp.Repo.update_all(Post, %{title: "old"}, %{"$set" => %{title: "updated"}})
374374
"""
375375
@callback update_all(module :: module(), filter :: BSON.document(), update :: BSON.document(), opts :: Keyword.t()) ::
376-
{:ok, Mongo.UpdateResult.t()}
376+
{:ok, Mongo.result(Mongo.UpdateResult.t())}
377377

378378
@doc """
379379
Deletes all documents for the given collection module and filter.

0 commit comments

Comments
 (0)