class Mongo::Operation::DropDatabase

A MongoDB drop database operation.

@api private

@since 2.4.0

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::Result ] The operation result.

@since 2.4.0

# File lib/mongo/operation/drop_database.rb, line 39
def execute(server)
  if server.features.op_msg_enabled?
    OpMsg.new(spec).execute(server)
  else
    Command.new(spec).execute(server)
  end
end