Module: Mongo::Operation::Write::Command::Writable
- Includes:
- Limited
- Included in:
- CreateIndex, CreateUser, Delete, DropIndex, Insert, RemoveUser, Update, UpdateUser
- Defined in:
- lib/mongo/operation/write/command/writable.rb
Overview
Provides common behavior for write commands. Assigns an operation id when executed.
Instance Method Summary collapse
-
#execute(context) ⇒ Result
Execute the operation.
Methods included from Limited
Instance Method Details
#execute(context) ⇒ Result
Execute the operation. The context gets a connection on which the operation is sent in the block.
36 37 38 39 40 |
# File 'lib/mongo/operation/write/command/writable.rb', line 36 def execute(context) context.with_connection do |connection| connection.dispatch([ ], operation_id) end end |