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 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 ignores NamespaceNotFound error.
30 31 32 33 34 35 36 37 |
# File 'lib/mongo/collection/helpers.rb', line 30 def do_drop(operation, session, context) operation.execute(next_primary(nil, session), context: context) rescue Error::OperationFailure::Family => e # NamespaceNotFound raise unless e.code == 26 || (e.code.nil? && e. =~ /ns not found/) false end |