Skip to content

Latest commit

 

History

History
149 lines (61 loc) · 1.63 KB

DropDatabase.md

File metadata and controls

149 lines (61 loc) · 1.63 KB

DropDatabase

Operation for the dropDatabase command.

See Also:

Properties

databaseName

private string $databaseName

options

private array $options

Methods

__construct

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

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() -

createOptions

Create options for executing the command.

private createOptions(): array

See Also: