@@ -49,7 +49,7 @@ def find_one_and_delete(opts = {})
4949 with_session ( opts ) do |session |
5050 write_with_retry ( session , write_concern ) do |server , txn_num |
5151 apply_collation! ( cmd , server , opts )
52- Operation ::Commands :: Command . new (
52+ Operation ::Command . new (
5353 :selector => cmd ,
5454 :db_name => database . name ,
5555 :session => session ,
@@ -121,7 +121,7 @@ def find_one_and_update(document, opts = {})
121121 write_with_retry ( session , write_concern ) do |server , txn_num |
122122 apply_collation! ( cmd , server , opts )
123123 apply_array_filters! ( cmd , server , opts )
124- Operation ::Commands :: Command . new (
124+ Operation ::Command . new (
125125 :selector => cmd ,
126126 :db_name => database . name ,
127127 :session => session ,
@@ -149,8 +149,8 @@ def delete_many(opts = {})
149149 with_session ( opts ) do |session |
150150 legacy_write_with_retry do |server |
151151 apply_collation! ( delete_doc , server , opts )
152- Operation ::Write :: Delete . new (
153- :delete => delete_doc ,
152+ Operation ::Delete . new (
153+ :deletes => [ delete_doc ] ,
154154 :db_name => collection . database . name ,
155155 :coll_name => collection . name ,
156156 :write_concern => collection . write_concern ,
@@ -178,8 +178,8 @@ def delete_one(opts = {})
178178 with_session ( opts ) do |session |
179179 write_with_retry ( session , write_concern ) do |server , txn_num |
180180 apply_collation! ( delete_doc , server , opts )
181- Operation ::Write :: Delete . new (
182- :delete => delete_doc ,
181+ Operation ::Delete . new (
182+ :deletes => [ delete_doc ] ,
183183 :db_name => collection . database . name ,
184184 :coll_name => collection . name ,
185185 :write_concern => write_concern ,
@@ -217,8 +217,8 @@ def replace_one(replacement, opts = {})
217217 apply_collation! ( update_doc , server , opts )
218218 apply_array_filters! ( update_doc , server , opts )
219219
220- Operation ::Write :: Update . new (
221- :update => update_doc ,
220+ Operation ::Update . new (
221+ :updates => [ update_doc ] ,
222222 :db_name => collection . database . name ,
223223 :coll_name => collection . name ,
224224 :write_concern => write_concern ,
@@ -256,8 +256,8 @@ def update_many(spec, opts = {})
256256 legacy_write_with_retry do |server |
257257 apply_collation! ( update_doc , server , opts )
258258 apply_array_filters! ( update_doc , server , opts )
259- Operation ::Write :: Update . new (
260- :update => update_doc ,
259+ Operation ::Update . new (
260+ :updates => [ update_doc ] ,
261261 :db_name => collection . database . name ,
262262 :coll_name => collection . name ,
263263 :write_concern => collection . write_concern ,
@@ -296,8 +296,8 @@ def update_one(spec, opts = {})
296296 apply_collation! ( update_doc , server , opts )
297297 apply_array_filters! ( update_doc , server , opts )
298298
299- Operation ::Write :: Update . new (
300- :update => update_doc ,
299+ Operation ::Update . new (
300+ :updates => [ update_doc ] ,
301301 :db_name => collection . database . name ,
302302 :coll_name => collection . name ,
303303 :write_concern => write_concern ,
0 commit comments