Module: Mongo::Operation::Executable
- Includes:
- ResponseHandling
- Included in:
- Aggregate::Command, CollectionsInfo, Command::Command, Count::Command, Create::Command, CreateIndex::Command, CreateUser::Command, Delete::Command, Delete::Legacy, Distinct::Command, Drop::Command, DropDatabase::Command, DropIndex::Command, Mongo::Operation::Explain::Command, Mongo::Operation::Explain::Legacy, Find::Command, Find::Legacy, GetMore::Command, GetMore::Legacy, Indexes::Command, Indexes::Legacy, Insert::Command, Insert::Legacy, KillCursors::Command, KillCursors::Legacy, ListCollections::Command, MapReduce::Command, OpMsgBase, ParallelScan::Command, RemoveUser::Command, Update::Command, Update::Legacy, UpdateUser::Command, UsersInfo::Command
- Defined in:
- lib/mongo/operation/shared/executable.rb
Overview
Shared executable behavior of operations.
Instance Method Summary collapse
Instance Method Details
#do_execute(server, client, options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/mongo/operation/shared/executable.rb', line 25 def do_execute(server, client, = {}) unpin_maybe(session) do add_error_labels do add_server_diagnostics(server) do get_result(server, client, ).tap do |result| process_result(result, server) end end end end end |
#execute(server, client:, options: {}) ⇒ Object
37 38 39 40 41 |
# File 'lib/mongo/operation/shared/executable.rb', line 37 def execute(server, client:, options: {}) do_execute(server, client, ).tap do |result| validate_result(result, server) end end |