class Mongo::Operation::Insert::OpMsg
A MongoDB insert operation sent as an op message.
@api private
@since 2.5.2
Private Instance Methods
get_result(connection, context, options = {})
click to toggle source
# File lib/mongo/operation/insert/op_msg.rb, line 36 def get_result(connection, context, options = {}) # This is a Mongo::Operation::Insert::Result Result.new(*dispatch_message(connection, context), @ids) end
message(connection)
click to toggle source
# File lib/mongo/operation/insert/op_msg.rb, line 47 def message(connection) section = Protocol::Msg::Section1.new(IDENTIFIER, send(IDENTIFIER)) Protocol::Msg.new(flags, { validating_keys: true }, command(connection), section) end
selector(connection)
click to toggle source
# File lib/mongo/operation/insert/op_msg.rb, line 41 def selector(connection) { insert: coll_name, Protocol::Msg::DATABASE_IDENTIFIER => db_name, ordered: ordered? } end