Skip to content

Commit ee59172

Browse files
committed
RUBY-837 Update create_collection and create_index opts documentation
1 parent 171d450 commit ee59172

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/mongo/collection.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,8 @@ def update(selector, document, opts={})
550550
# The option is silently ignored by the server and unique index builds using the option will
551551
# fail if a duplicate value is detected.
552552
#
553+
# @note See the MongoDB documentation for a full list of supported options by server version.
554+
#
553555
# @return [String] the name of the index created.
554556
def create_index(spec, opts={})
555557
options = opts.dup
@@ -581,6 +583,8 @@ def create_index(spec, opts={})
581583
# The option is silently ignored by the server and unique index builds using the option will
582584
# fail if a duplicate value is detected.
583585
#
586+
# @note See the MongoDB documentation for a full list of supported options by server version.
587+
#
584588
# @return [String] the name of the index.
585589
def ensure_index(spec, opts={})
586590
now = Time.now.utc.to_i

lib/mongo/db.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ def collections_info(coll_name=nil)
316316
# either we're in +strict+ mode and the collection
317317
# already exists or collection creation fails on the server.
318318
#
319+
# @note See the MongoDB documentation for a full list of supported options by server version.
320+
#
319321
# @return [Mongo::Collection]
320322
def create_collection(name, opts={})
321323
name = name.to_s

0 commit comments

Comments
 (0)