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

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

Description

The start of the execution of a MongoDB command.

See also

Public Member Functions

 command_started_event (v1::events::command_started const &event)
 Construct with the mongocxx::v1 equivalent.
 command_started_event (void const *event)
bsoncxx::v_noabi::document::view command () const
 Returns the command that has been started.
bsoncxx::v_noabi::stdx::string_view command_name () const
 Returns the name of the command.
bsoncxx::v_noabi::stdx::string_view database_name () const
 Returns the name of the database.
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_started () 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_started_event() [1/2]

Deprecated
For internal use only.

◆ command_started_event() [2/2]

Member Function Documentation

◆ command()

Returns the command that has been started.

Returns
The command.

◆ command_name()

Returns the name of the command.

Returns
The command name.

◆ database_name()

Returns the name of the database.

Returns
The database name.

◆ host()

Returns the host name.

Returns
The host name.

◆ operation_id()

Returns the operation id.

Returns
The operation id.

◆ operator v1::events::command_started()

mongocxx::v_noabi::events::command_started_event::operator v1::events::command_started ( ) 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: