lib/mongo/database.rb
def drop(options = {})
      operation = { :dropDatabase => 1 }
      client.send(:with_session, options) do |session|
        write_concern = if options[:write_concern]
          WriteConcern.get(options[:write_concern])
        else
          self.write_concern
        end
        Operation::DropDatabase.new({
          selector: operation,
          db_name: name,
          write_concern: write_concern,
          session: session
        }).execute(next_primary(nil, session), context: Operation::Context.new(client: client, session: session))
      end
    end
# Drop the database and all its associated information.
#
# @example Drop the database.
#   database.drop
#
# @param [ Hash ] options The options for the operation.
#
# @option options [ Session ] :session The session to use for the operation.
# @option opts [ Hash ] :write_concern The write concern options.
#
# @return [ Result ] The result of the command.
#
# @since 2.0.0
Drop the database and all its associated information.
Drop the database and all its associated information .
def drop(options = {})
      operation = { :dropDatabase => 1 }
      client.send(:with_session, options) do |session|
        write_concern = if options[:write_concern]
          WriteConcern.get(options[:write_concern])
        else
          self.write_concern
        end
        Operation::DropDatabase.new({
          selector: operation,
          db_name: name,
          write_concern: write_concern,
          session: session
        }).execute(next_primary(nil, session), context: Operation::Context.new(client: client, session: session))
      end
    end
def drop ( options = { } ) operation = { :dropDatabase => 1 } client . send ( :with_session , options ) do | session | write_concern = if options [ :write_concern ] WriteConcern . get ( options [ :write_concern ] ) else self . write_concern end Operation :: DropDatabase . new ( { selector : operation , db_name : name , write_concern : write_concern , session : session } ) . execute ( next_primary ( nil , session ) , context : Operation :: Context . new ( client : client , session : session ) ) end end
Drop the database and all its associated information.
Drop the database and all its associated information .
The result of the command.
The result of the command .
 Result 
options
:session The session to use for the operation.
: session The session to use for the operation .
options The options for the operation.
options The options for the operation .
opts
:write_concern The write concern options.
: write_concern The write concern options .
example
Drop the database. database.drop
Drop the database . database . drop
since
None