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, context, options = {}) click to toggle source
# File lib/mongo/operation/insert/command.rb, line 38
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/command.rb, line 53
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 49
def options(server)
  super.merge(validating_keys: true)
end
selector(connection) click to toggle source
# File lib/mongo/operation/insert/command.rb, line 43
def selector(connection)
  { insert: coll_name,
    documents: send(IDENTIFIER),
    ordered: ordered? }
end