class Mongo::Operation::Insert::Command

A MongoDB insert operation sent as a command message.

@api private

@since 2.5.2

Private Instance Methods

get_result(connection, client, options = {}) click to toggle source
# File lib/mongo/operation/insert/command.rb, line 35
def get_result(connection, client, options = {})
  # This is a Mongo::Operation::Insert::Result
  Result.new(*dispatch_message(connection, client), @ids)
end
message(connection) click to toggle source
# File lib/mongo/operation/insert/command.rb, line 50
def message(connection)
  Protocol::Query.new(db_name, Database::COMMAND, command(connection), options(connection))
end
options(server) click to toggle source
Calls superclass method Mongo::Operation::Limited#options
# File lib/mongo/operation/insert/command.rb, line 46
def options(server)
  super.merge(validating_keys: true)
end
selector(connection) click to toggle source
# File lib/mongo/operation/insert/command.rb, line 40
def selector(connection)
  { insert: coll_name,
    documents: send(IDENTIFIER),
    ordered: ordered? }
end