Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/mongo/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ def update(selector, document, opts={})
# The option is silently ignored by the server and unique index builds using the option will
# fail if a duplicate value is detected.
#
# @note See the MongoDB documentation for a full list of supported options by server version.
#
# @return [String] the name of the index created.
def create_index(spec, opts={})
options = opts.dup
Expand Down Expand Up @@ -581,6 +583,8 @@ def create_index(spec, opts={})
# The option is silently ignored by the server and unique index builds using the option will
# fail if a duplicate value is detected.
#
# @note See the MongoDB documentation for a full list of supported options by server version.
#
# @return [String] the name of the index.
def ensure_index(spec, opts={})
now = Time.now.utc.to_i
Expand Down
2 changes: 2 additions & 0 deletions lib/mongo/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ def collections_info(coll_name=nil)
# either we're in +strict+ mode and the collection
# already exists or collection creation fails on the server.
#
# @note See the MongoDB documentation for a full list of supported options by server version.
#
# @return [Mongo::Collection]
def create_collection(name, opts={})
name = name.to_s
Expand Down