Module: Mongo::Operation::BypassDocumentValidation Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongo/operation/shared/bypass_document_validation.rb |
Overview
Custom behavior for operations that support the bypassdocumentvalidation option.
Instance Method Summary
- #add_bypass_document_validation(sel) private Internal use only
- #command(connection) private Internal use only
Instance Method Details
#add_bypass_document_validation(sel) (private)
# File 'lib/mongo/operation/shared/bypass_document_validation.rb', line 40
def add_bypass_document_validation(sel) return sel unless bypass_document_validation sel.merge(bypassDocumentValidation: true) end
#command(connection) (private)
# File 'lib/mongo/operation/shared/bypass_document_validation.rb', line 29
def command(connection) if Lint.enabled? unless connection.is_a?(Server::Connection) raise Error::LintError, "Connection is not a Connection instance: #{connection}" end end sel = super add_bypass_document_validation(sel) end