123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Operation::OpMsgExecutable Private

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Defined in: lib/mongo/operation/shared/op_msg_executable.rb

Overview

Shared behavior of executing the operation as an OpMsg.

Instance Method Summary

Instance Method Details

#execute(server, context:, options: {}) ⇒ Mongo::Operation::Result

Execute the operation.

Parameters:

Returns:

[ GitHub ]

  
# 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) do |connection|
    execute_with_connection(connection, context: context, options: options)
  end
end

#execute_with_connection(connection, context:, options: {}) ⇒ Mongo::Operation::Result

Execute the operation.

Parameters:

Returns:

[ GitHub ]

  
# File 'lib/mongo/operation/shared/op_msg_executable.rb', line 48

def execute_with_connection(connection, context:, options: {})
  final_operation.execute(connection, context: context, options: options)
end

#final_operation (private)

[ GitHub ]

  
# File 'lib/mongo/operation/shared/op_msg_executable.rb', line 54

def final_operation
  polymorphic_class(self.class.name, :OpMsg).new(spec)
end