Loading...
Searching...
No Matches
mongocxx::v_noabi::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
  - Command Logging and Monitoring (MongoDB Specifications)

## 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::oid > | service_id () const
| Optionally returns the service id.

## Constructor & Destructor Documentation

## command_started_event() [1/2]

mongocxx::v_noabi::events::command_started_event::command_started_event | ( | void const * | event | ) |

explicit

Deprecated
  For internal use only.

## command_started_event() [2/2]

mongocxx::v_noabi::events::command_started_event::command_started_event | ( | v1::events::command_started const & | event | ) |

inline

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## command()

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

inline

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

inline

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

inline

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

inline

Returns the host name.

Returns
  The host name.

## operation_id()

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

inline

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

inline explicit

Convert to the mongocxx::v1 equivalent.

## port()

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

inline

Returns the port.

Returns
  The port.

## request_id()

std::int64_t mongocxx::v_noabi::events::command_started_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_started_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:

- mongocxx/v_noabi/mongocxx/events/command_started_event.hpp