Module: Mongo::Operation::OpMsgExecutable Private
Do not use. This module is for internal use only.
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
Aggregate,
CollectionsInfo,
Command,
Count,
Create,
CreateIndex,
CreateSearchIndexes,
CreateUser,
Distinct,
Drop,
DropDatabase,
DropIndex,
DropSearchIndex,
Explain,
Find,
GetMore,
Indexes,
KillCursors,
ListCollections,
MapReduce,
ParallelScan,
RemoveUser,
UpdateSearchIndex,
UpdateUser,
UsersInfo,
WriteCommand
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
PolymorphicLookup
|
|
| Defined in: | lib/mongo/operation/shared/op_msg_executable.rb |
Overview
Shared behavior of executing the operation as an OpMsg.
Instance Method Summary
-
#execute(server, context:, options: {}) ⇒ Mongo::Operation::Result
Internal use only
Execute the operation.
-
#execute_with_connection(connection, context:, options: {}) ⇒ Mongo::Operation::Result
Internal use only
Execute the operation.
- #final_operation private Internal use only
PolymorphicLookup - Included
Instance Method Details
#execute(server, context:, options: {}) ⇒ Mongo::Operation::Result
Execute the operation.
# File '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, context: context ) do |connection| execute_with_connection(connection, context: context, options: ) end end
#execute_with_connection(connection, context:, options: {}) ⇒ Mongo::Operation::Result
Execute the operation.
# File 'lib/mongo/operation/shared/op_msg_executable.rb', line 51
def execute_with_connection(connection, context:, options: {}) final_operation.execute(connection, context: context, options: ) end
#final_operation (private)
[ GitHub ]# File 'lib/mongo/operation/shared/op_msg_executable.rb', line 57
def final_operation polymorphic_class(self.class.name, :OpMsg).new(spec) end