MongoDB C++ Driver mongocxx-3.1.1
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
mongocxx Namespace Reference

Top level namespace for the MongoDB C++ driver. More...

Classes

class  authentication_exception
 
class  bulk_write
 Class representing a batch of write operations that can be sent to the server as a group. More...
 
class  bulk_write_exception
 
class  client
 Class representing a client connection to MongoDB. More...
 
class  collection
 Class representing server side document groupings within a MongoDB database. More...
 
class  cursor
 Class representing a pointer to the result set of a query on a MongoDB server. More...
 
class  database
 Class representing a MongoDB database. More...
 
class  exception
 A class to be used as the base class for all mongocxx exceptions. More...
 
class  hint
 Class representing a hint to be passed to a database operation. More...
 
class  insert_many_builder
 Class to build an insert_many bulk write operation. More...
 
class  instance
 Class representing an instance of the MongoDB driver. More...
 
class  logger
 The interface that all user-defined loggers must implement. More...
 
class  logic_error
 
class  operation_exception
 
class  pipeline
 Class representing a MongoDB aggregation pipeline. More...
 
class  pool
 A pool of client objects associated with a MongoDB deployment. More...
 
class  query_exception
 
class  read_concern
 A class to represent the read concern. More...
 
class  read_preference
 Class representing a preference for how the driver routes read operations to members of a replica set or to a sharded cluster. More...
 
class  uri
 Class representing a MongoDB connection string URI. More...
 
class  validation_criteria
 Class representing criteria for document validation, to be applied to a collection. More...
 
class  write_concern
 Class representing the server-side requirement for reporting the success of a write operation. More...
 
class  write_exception
 

Enumerations

enum class  error_code : std::int32_t
 
enum class  server_error_code : std::int32_t
 
enum class  log_level
 The log level of a message passed to a @logger.
 
enum class  write_type
 

Functions

const std::error_category & error_category ()
 Get the error_category for mongocxx library exceptions.
 
std::error_code make_error_code (error_code error)
 Translate a mongocxx::error_code into a std::error_code.
 
const std::error_category & server_error_category ()
 Get the error_category for mongocxx library exceptions.
 
std::error_code make_error_code (server_error_code error)
 Translate a mongocxx::server_error_code into a std::error_code.
 
stdx::string_view to_string (log_level level)
 Returns a stringification of the given log level.
 

Detailed Description

Top level namespace for the MongoDB C++ driver.

Enumeration Type Documentation

◆ error_code

enum class mongocxx::error_code : std::int32_t
strong
Todo:
document this enum and the values

◆ server_error_code

enum class mongocxx::server_error_code : std::int32_t
strong
Todo:
document this enum and the values

◆ write_type

enum class mongocxx::write_type
strong
Todo:
document this enumeration and the each value

Function Documentation

◆ error_category()

const std::error_category & mongocxx::error_category ( )

Get the error_category for mongocxx library exceptions.

Returns
The mongocxx error_category

◆ make_error_code() [1/2]

std::error_code mongocxx::make_error_code ( error_code  error)

Translate a mongocxx::error_code into a std::error_code.

Parameters
errorA mongocxx::error_code
Returns
A std::error_code

◆ make_error_code() [2/2]

std::error_code mongocxx::make_error_code ( server_error_code  error)

Translate a mongocxx::server_error_code into a std::error_code.

Parameters
errorA mongocxx::error_code
Returns
A std::error_code

◆ server_error_category()

const std::error_category & mongocxx::server_error_category ( )

Get the error_category for mongocxx library exceptions.

Returns
The mongocxx error_category

◆ to_string()

stdx::string_view mongocxx::to_string ( log_level  level)

Returns a stringification of the given log level.

Parameters
rhsThe type to stringify.
Returns
a std::string representation of the type.