class Mongo::Operation::Delete::OpMsg

A MongoDB delete operation sent as an op message.

@api private

@since 2.5.2

Private Instance Methods

message(connection) click to toggle source
# File lib/mongo/operation/delete/op_msg.rb, line 49
def message(connection)
  section = Protocol::Msg::Section1.new(IDENTIFIER, send(IDENTIFIER))
  Protocol::Msg.new(flags, {}, command(connection), section)
end
selector(connection) click to toggle source
# File lib/mongo/operation/delete/op_msg.rb, line 36
def selector(connection)
  { delete: coll_name,
    Protocol::Msg::DATABASE_IDENTIFIER => db_name,
    ordered: ordered?,
    let: spec[:let],
  }.compact.tap do |selector|
    if hint = spec[:hint]
      validate_hint_on_update(connection, selector)
      selector[:hint] = hint
    end
  end
end