Module: Mongo::Collection::Helpers Private
- Included in:
- Mongo::Collection, SearchIndex::View
- Defined in:
- lib/mongo/collection/helpers.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
This module contains helper methods collection class.
Instance Method Summary collapse
-
#do_drop(operation, session, context) ⇒ Result
private
Executes drop operation and and ignores NamespaceNotFound error.
Instance Method Details
#do_drop(operation, session, context) ⇒ Result
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Executes drop operation and and ignores NamespaceNotFound error.
31 32 33 34 35 36 37 38 39 40 |
# 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 |