MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::events::command_failed_event Class Reference

#include <mongocxx/v_noabi/mongocxx/events/command_failed_event.hpp>

Description

The failed execution of a MongoDB command.

See also

Public Member Functions

 command_failed_event (v1::events::command_failed const &event)
 Construct with the mongocxx::v1 equivalent.
 command_failed_event (void const *event)
bsoncxx::v_noabi::stdx::string_view command_name () const
 Returns the name of the command.
std::int64_t duration () const
 Returns the duration of the failed operation.
bsoncxx::v_noabi::document::view failure () const
 Returns the server’s reply to the failed operation.
bsoncxx::v_noabi::stdx::string_view host () const
 Returns the host name.
std::int64_t operation_id () const
 Returns the operation id.
 operator v1::events::command_failed () const
 Convert to the mongocxx::v1 equivalent.
std::uint16_t port () const
 Returns the port.
std::int64_t request_id () const
 Returns the request id.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::oidservice_id () const
 Optionally returns the service id.

Constructor & Destructor Documentation

◆ command_failed_event() [1/2]

Deprecated
For internal use only.

◆ command_failed_event() [2/2]

Member Function Documentation

◆ command_name()

Returns the name of the command.

Returns
The command name.

◆ duration()

Returns the duration of the failed operation.

Returns
The duration in microseconds.

◆ failure()

Returns the server’s reply to the failed operation.

Returns
The failure.

◆ host()

Returns the host name.

Returns
The host name.

◆ operation_id()

Returns the operation id.

Returns
The operation id.

◆ operator v1::events::command_failed()

mongocxx::v_noabi::events::command_failed_event::operator v1::events::command_failed ( ) const
inlineexplicit

Convert to the mongocxx::v1 equivalent.

◆ port()

Returns the port.

Returns
The port.

◆ request_id()

Returns the request id.

Returns
The request id.

◆ service_id()

Optionally returns the service id.

Returns
No contained value, or contains the service id if load balancing is enabled.

The documentation for this class was generated from the following file: