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

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

Description

The successful execution of a MongoDB command.

See also

Public Member Functions

 command_succeeded_event (v1::events::command_succeeded const &event)
 Construct with the mongocxx::v1 equivalent.
 command_succeeded_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 successful 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_succeeded () const
 Convert to the mongocxx::v1 equivalent.
std::uint16_t port () const
 Returns the port.
bsoncxx::v_noabi::document::view reply () const
 Returns the server reply for the succeeded operation.
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_succeeded_event() [1/2]

mongocxx::v_noabi::events::command_succeeded_event::command_succeeded_event ( void const * event)
explicit
Deprecated
For internal use only.

◆ command_succeeded_event() [2/2]

mongocxx::v_noabi::events::command_succeeded_event::command_succeeded_event ( v1::events::command_succeeded const & event)
inline

Construct with the mongocxx::v1 equivalent.

Member Function Documentation

◆ command_name()

bsoncxx::v_noabi::stdx::string_view mongocxx::v_noabi::events::command_succeeded_event::command_name ( ) const
inline

Returns the name of the command.

Returns
The command name.

◆ duration()

std::int64_t mongocxx::v_noabi::events::command_succeeded_event::duration ( ) const
inline

Returns the duration of the successful operation.

Returns
The duration in microseconds.

◆ host()

bsoncxx::v_noabi::stdx::string_view mongocxx::v_noabi::events::command_succeeded_event::host ( ) const
inline

Returns the host name.

Returns
The host name.

◆ operation_id()

std::int64_t mongocxx::v_noabi::events::command_succeeded_event::operation_id ( ) const
inline

Returns the operation id.

Returns
The operation id.

◆ operator v1::events::command_succeeded()

mongocxx::v_noabi::events::command_succeeded_event::operator v1::events::command_succeeded ( ) const
inlineexplicit

Convert to the mongocxx::v1 equivalent.

◆ port()

std::uint16_t mongocxx::v_noabi::events::command_succeeded_event::port ( ) const
inline

Returns the port.

Returns
The port.

◆ reply()

bsoncxx::v_noabi::document::view mongocxx::v_noabi::events::command_succeeded_event::reply ( ) const
inline

Returns the server reply for the succeeded operation.

Returns
The reply.

◆ request_id()

std::int64_t mongocxx::v_noabi::events::command_succeeded_event::request_id ( ) const
inline

Returns the request id.

Returns
The request id.

◆ service_id()

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::oid > mongocxx::v_noabi::events::command_succeeded_event::service_id ( ) const
inline

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: