Skip to content

Commit 1af998a

Browse files
Add doc comments
1 parent 51c9a0a commit 1af998a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/mongo/collection.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,11 @@ def parallel_scan(cursor_count, options = {})
10491049
# May be specified as a Hash (e.g. { _id: 1 }) or a String (e.g. "_id_").
10501050
# @option options [ Hash ] :let Mapping of variables to use in the command.
10511051
# See the server documentation for details.
1052+
# @option opts [ Hash ] :sort Specifies which document the operation
1053+
# replaces if the query matches multiple documents. The first document
1054+
# matched by the sort order will be replaced.
1055+
# This option is only supported by servers >= 8.0. Older servers will
1056+
# report an error for using this option.
10521057
#
10531058
# @return [ Result ] The response from the database.
10541059
#
@@ -1115,6 +1120,11 @@ def update_many(filter, update, options = {})
11151120
# May be specified as a Hash (e.g. { _id: 1 }) or a String (e.g. "_id_").
11161121
# @option options [ Hash ] :let Mapping of variables to use in the command.
11171122
# See the server documentation for details.
1123+
# @option opts [ Hash ] :sort Specifies which document the operation
1124+
# updates if the query matches multiple documents. The first document
1125+
# matched by the sort order will be updated.
1126+
# This option is only supported by servers >= 8.0. Older servers will
1127+
# report an error for using this option.
11181128
#
11191129
# @return [ Result ] The response from the database.
11201130
#

lib/mongo/collection/view/writable.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ def delete_one(opts = {})
389389
# @option opts [ true, false ] :upsert Whether to upsert if the
390390
# document doesn't exist.
391391
# Can be :w => Integer, :fsync => Boolean, :j => Boolean.
392+
# @option opts [ Hash ] :sort Specifies which document the operation
393+
# replaces if the query matches multiple documents. The first document
394+
# matched by the sort order will be replaced.
395+
# This option is only supported by servers >= 8.0. Older servers will
396+
# report an error for using this option.
392397
#
393398
# @return [ Result ] The response from the database.
394399
#
@@ -550,6 +555,11 @@ def update_many(spec, opts = {})
550555
# document doesn't exist.
551556
# @option opts [ Hash ] :write_concern The write concern options.
552557
# Can be :w => Integer, :fsync => Boolean, :j => Boolean.
558+
# @option opts [ Hash ] :sort Specifies which document the operation
559+
# updates if the query matches multiple documents. The first document
560+
# matched by the sort order will be updated.
561+
# This option is only supported by servers >= 8.0. Older servers will
562+
# report an error for using this option.
553563
#
554564
# @return [ Result ] The response from the database.
555565
#

0 commit comments

Comments
 (0)