Documentation

DropDatabase
in package
implements Executable

Operation for the dropDatabase command.

Tags
see
Client::dropDatabase()
see
Database::drop()
see
http://docs.mongodb.org/manual/reference/command/dropDatabase/

Interfaces, Classes, Traits and Enums

Executable

Table of Contents

$databaseName  : string
$options  : array<string|int, mixed>
__construct()  : mixed
Constructs a dropDatabase command.
execute()  : array<string|int, mixed>|object
Execute the operation.
createOptions()  : array<string|int, mixed>
Create options for executing the command.

Properties

Methods

__construct()

Constructs a dropDatabase command.

public __construct(string $databaseName[, array<string|int, mixed> $options = [] ]) : mixed

Supported options:

  • session (MongoDB\Driver\Session): Client session.

  • typeMap (array): Type map for BSON deserialization. This will be used for the returned command result document.

  • writeConcern (MongoDB\Driver\WriteConcern): Write concern.

Parameters
$databaseName : string

Database name

$options : array<string|int, mixed> = []

Command options

Tags
throws
InvalidArgumentException

for parameter/option parsing errors

Return values
mixed

execute()

Execute the operation.

public execute(Server $server) : array<string|int, mixed>|object
Parameters
$server : Server
Tags
see
Executable::execute()
throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
array<string|int, mixed>|object

Command result document

Search results