Module: Mongo::Operation::Write::WriteCommandEnabled
- Included in:
- CreateIndex, CreateUser, Delete, DropIndex, Insert, RemoveUser, Update, UpdateUser
- Defined in:
- lib/mongo/operation/write/write_command_enabled.rb
Overview
This module contains common functionality for operations that send either a write command or a specific wire protocol message, depending on server version. For server versions >= 2.6, a write command is sent.
Instance Method Summary collapse
-
#execute(context) ⇒ Result
Execute the operation.
Instance Method Details
#execute(context) ⇒ Result
Execute the operation.
36 37 38 39 40 41 42 |
# File 'lib/mongo/operation/write/write_command_enabled.rb', line 36 def execute(context) if context.features.write_command_enabled? execute_write_command(context) else (context) end end |