File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1117,7 +1117,7 @@ defmodule Mongo do
1117
1117
upsert: Keyword . get ( opts , :upsert ) ,
1118
1118
multi: multi ,
1119
1119
collation: Keyword . get ( opts , :collation ) ,
1120
- arrayFilters: Keyword . get ( opts , :filters )
1120
+ arrayFilters: Keyword . get ( opts , :array_filters )
1121
1121
} |> filter_nils ( )
1122
1122
1123
1123
cmd = [
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ defmodule Mongo.BulkWrite do
414
414
upsert: Keyword . get ( update_opts , :upsert ) ,
415
415
multi: Keyword . get ( update_opts , :multi ) || false ,
416
416
collation: Keyword . get ( update_opts , :collation ) ,
417
- arrayFilters: Keyword . get ( update_opts , :filters )
417
+ arrayFilters: Keyword . get ( update_opts , :array_filters )
418
418
] |> filter_nils ( )
419
419
420
420
end
Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ defmodule Mongo.UnorderedBulk do
77
77
% UnorderedBulk { coll: coll }
78
78
end
79
79
80
+ @ doc """
81
+ Adds the two unordered bulks together.
82
+ """
83
+ def add ( % UnorderedBulk { coll: coll_a } = a , % UnorderedBulk { coll: coll_b } = b ) when coll_a == coll_b do
84
+ % UnorderedBulk { coll: coll_a ,
85
+ inserts: a . inserts ++ b . inserts ,
86
+ updates: a . updates ++ b . updates ,
87
+ deletes: a . deletes ++ b . deletes }
88
+ end
89
+
80
90
@ doc """
81
91
Appends a bulk operation to the unordered bulk. One of the field (inserts, updates or deletes)
82
92
will be updated.
You can’t perform that action at this time.
0 commit comments