Operation for the dropDatabase command.
- Full name:
\MongoDB\Operation\DropDatabase
- This class implements:
\MongoDB\Operation\Executable
See Also:
- \MongoDB\Client::dropDatabase() -
- \MongoDB\Database::drop() -
- http://docs.mongodb.org/manual/reference/command/dropDatabase/ -
private string $databaseName
private array $options
Constructs a dropDatabase command.
public __construct(string $databaseName, array $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:
Parameter | Type | Description |
---|---|---|
$databaseName |
string | Database name |
$options |
array | Command options |
Execute the operation.
public execute(\MongoDB\Driver\Server $server): array|object
Parameters:
Parameter | Type | Description |
---|---|---|
$server |
\MongoDB\Driver\Server |
Return Value:
Command result document
See Also:
- \MongoDB\Operation\Executable::execute() -
Create options for executing the command.
private createOptions(): array
See Also: