class Mongo::Operation::Find::OpMsg
Execute the operation.
@example
operation.execute(server)
@param [ Mongo::Server ] server The server to send the operation to.
@return [ Mongo::Operation::Find::Result ] The operation result.
@since 2.5.2
Public Instance Methods
execute(server)
click to toggle source
Execute the operation.
@example
operation.execute(server)
@param [ Mongo::Server ] server The server to send the operation to.
@return [ Mongo::Operation::Find::Result ] The operation result.
@since 2.5.2
# File lib/mongo/operation/find/op_msg.rb, line 45 def execute(server) result = Result.new(dispatch_message(server)) process_result(result, server) result.validate! rescue Mongo::Error::SocketError => e e.send(:add_label, Mongo::Error::TRANSIENT_TRANSACTION_ERROR_LABEL) if session.in_transaction? raise e end
Private Instance Methods
message(server)
click to toggle source
# File lib/mongo/operation/find/op_msg.rb, line 56 def message(server) Protocol::Msg.new(flags, options, command(server)) end