Returns the database on which the command was executed

# MongoDB\Driver\Monitoring\CommandFailedEvent::getDatabaseName

(mongodb >=1.19.0)

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

### Description

final public MongoDB\Driver\Monitoring\CommandFailedEvent::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