Returns the database on which the command was executed

# MongoDB\Driver\Monitoring\CommandSucceededEvent::getDatabaseName

(mongodb >=1.19.0)

MongoDB\Driver\Monitoring\CommandSucceededEvent::getDatabaseName — Returns the database on which the command was executed

### Description

final public function MongoDB\Driver\Monitoring\CommandSucceededEvent::getDatabaseName(): string

### Parameters

This function has no parameters.

### Return Values

Returns the database on which the command was executed.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

### See Also

- Application Performance Monitoring (APM)

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open