Module: Mongo::Collection::Helpers Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongo/collection/helpers.rb |
Overview
This module contains helper methods collection class.
Instance Method Summary
-
#do_drop(operation, session, context) ⇒ Result
Internal use only
Executes drop operation and and ignores NamespaceNotFound error.
Instance Method Details
#do_drop(operation, session, context) ⇒ Result
Executes drop operation and and ignores NamespaceNotFound error.
# File 'lib/mongo/collection/helpers.rb', line 31
def do_drop(operation, session, context) operation.execute(next_primary(nil, session), context: context) rescue Error::OperationFailure::Family => ex # NamespaceNotFound if ex.code == 26 || ex.code.nil? && ex. =~ /ns not found/ false else raise end end