@@ -210,7 +210,7 @@ def count(filter = nil, options = {})
210
210
#
211
211
# @option options [ Integer ] :max_time_ms The maximum amount of time to allow the command to run.
212
212
#
213
- # @return [ Integer ] The document count .
213
+ # @return [ Array<Object> ] The list of distinct values .
214
214
#
215
215
# @since 2.1.0
216
216
def distinct ( field_name , filter = nil , options = { } )
@@ -289,6 +289,11 @@ def insert_many(documents, options = {})
289
289
# @param [ Array<Hash> ] operations The operations.
290
290
# @param [ Hash ] options The options.
291
291
#
292
+ # @option options [ true, false ] :ordered Whether the operations
293
+ # should be executed in order.
294
+ # @option options [ Hash ] :write_concern The write concern options.
295
+ # Can be :w => Integer, :fsync => Boolean, :j => Boolean.
296
+ #
292
297
# @return [ BulkWrite::Result ] The result of the operation.
293
298
#
294
299
# @since 2.0.0
@@ -410,7 +415,7 @@ def find_one_and_delete(filter, opts = {})
410
415
# collection.find_one_and_update({ name: 'test' }, { "$set" => { name: 'test1' }}, :return_document => :before)
411
416
#
412
417
# @param [ Hash ] filter The filter to use.
413
- # @param [ BSON::Document ] document The update statement.
418
+ # @param [ BSON::Document ] update The update statement.
414
419
# @param [ Hash ] opts The options.
415
420
#
416
421
# @option opts [ Integer ] :max_time_ms The maximum amount of time to allow the command
@@ -426,8 +431,8 @@ def find_one_and_delete(filter, opts = {})
426
431
# @return [ BSON::Document ] The document.
427
432
#
428
433
# @since 2.1.0
429
- def find_one_and_update ( filter , document , opts = { } )
430
- find ( filter , opts ) . find_one_and_update ( document , opts )
434
+ def find_one_and_update ( filter , update , opts = { } )
435
+ find ( filter , opts ) . find_one_and_update ( update , opts )
431
436
end
432
437
433
438
# Finds a single document and replaces it.
@@ -439,7 +444,7 @@ def find_one_and_update(filter, document, opts = {})
439
444
# collection.find_one_and_replace({ name: 'test' }, { name: 'test1' }, :return_document => :after)
440
445
#
441
446
# @param [ Hash ] filter The filter to use.
442
- # @param [ BSON::Document ] document The replacement.
447
+ # @param [ BSON::Document ] replacement The replacement document .
443
448
# @param [ Hash ] opts The options.
444
449
#
445
450
# @option opts [ Integer ] :max_time_ms The maximum amount of time to allow the command
0 commit comments