Module: Mongo::Operation::OpMsgExecutable Private
- Includes:
- PolymorphicLookup
- Included in:
- Aggregate, CollectionsInfo, Command, Count, Create, CreateIndex, CreateUser, Distinct, Drop, DropDatabase, DropIndex, Explain, Find, GetMore, Indexes, KillCursors, ListCollections, MapReduce, ParallelScan, RemoveUser, UpdateUser, UsersInfo, WriteCommand
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/operation/shared/op_msg_executable.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.
Shared behavior of executing the operation as an OpMsg.
Instance Method Summary collapse
-
#execute(server, context:, options: {}) ⇒ Mongo::Operation::Result
private
Execute the operation.
-
#execute_with_connection(connection, context:, options: {}) ⇒ Mongo::Operation::Result
private
Execute the operation.
Instance Method Details
#execute(server, context:, options: {}) ⇒ Mongo::Operation::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.
Execute the operation.
34 35 36 37 38 |
# File 'build/ruby-driver-v2.19/lib/mongo/operation/shared/op_msg_executable.rb', line 34 def execute(server, context:, options: {}) server.with_connection(connection_global_id: context.connection_global_id) do |connection| execute_with_connection(connection, context: context, options: ) end end |
#execute_with_connection(connection, context:, options: {}) ⇒ Mongo::Operation::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.
Execute the operation.
48 49 50 |
# File 'build/ruby-driver-v2.19/lib/mongo/operation/shared/op_msg_executable.rb', line 48 def execute_with_connection(connection, context:, options: {}) final_operation.execute(connection, context: context, options: ) end |