MongoDB C++ Driver  mongocxx-3.10.2
Public Member Functions | List of all members
mongocxx::v_noabi::events::command_started_event Class Reference

An event notification sent when the driver begins executing a MongoDB command. More...

#include <command_started_event.hpp>

Public Member Functions

 ~command_started_event ()
 Destroys a command_started_event.
 
bsoncxx::v_noabi::document::view command () const
 Returns the command that has been started. More...
 
bsoncxx::v_noabi::stdx::string_view database_name () const
 Returns the name of the database. More...
 
bsoncxx::v_noabi::stdx::string_view command_name () const
 Returns the name of the command. More...
 
std::int64_t request_id () const
 Returns the request id. More...
 
std::int64_t operation_id () const
 Returns the operation id. More...
 
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::oidservice_id () const
 Optionally returns the service id. More...
 
bsoncxx::v_noabi::stdx::string_view host () const
 Returns the host name. More...
 
std::uint16_t port () const
 Returns the port. More...
 

Detailed Description

An event notification sent when the driver begins executing a MongoDB command.

See also
"CommandStartedEvent" in https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.rst

Member Function Documentation

◆ command()

bsoncxx::v_noabi::document::view mongocxx::v_noabi::events::command_started_event::command ( ) const

Returns the command that has been started.

Returns
The command.

◆ command_name()

bsoncxx::v_noabi::stdx::string_view mongocxx::v_noabi::events::command_started_event::command_name ( ) const

Returns the name of the command.

Returns
The command name.

◆ database_name()

bsoncxx::v_noabi::stdx::string_view mongocxx::v_noabi::events::command_started_event::database_name ( ) const

Returns the name of the database.

Returns
The database name.

◆ host()

bsoncxx::v_noabi::stdx::string_view mongocxx::v_noabi::events::command_started_event::host ( ) const

Returns the host name.

Returns
The host name.

◆ operation_id()

std::int64_t mongocxx::v_noabi::events::command_started_event::operation_id ( ) const

Returns the operation id.

Returns
The operation id.

◆ port()

std::uint16_t mongocxx::v_noabi::events::command_started_event::port ( ) const

Returns the port.

Returns
The port.

◆ request_id()

std::int64_t mongocxx::v_noabi::events::command_started_event::request_id ( ) const

Returns the request id.

Returns
The request id.

◆ service_id()

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

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: