CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
22 #include <bsoncxx/builder/stream/array.hpp>
23 #include <bsoncxx/builder/stream/document.hpp>
24 #include <mongocxx/client.hpp>
25 #include <mongocxx/pool.hpp>
28 namespace catapult {
namespace mongo {
34 explicit MongoDatabase(mongocxx::pool& connectionPool,
const std::string& databaseName)
41 operator const mongocxx::database&()
const {
46 operator mongocxx::database&() {
51 const mongocxx::collection
operator[](
const std::string& collectionName)
const {
56 mongocxx::collection
operator[](
const std::string& collectionName) {
mongocxx::database m_database
Definition: MongoDatabase.h:62
mongocxx::collection operator[](const std::string &collectionName)
Gets the mongocxx collection with name collectionName.
Definition: MongoDatabase.h:56
const mongocxx::collection operator[](const std::string &collectionName) const
Gets the const mongocxx collection with name collectionName.
Definition: MongoDatabase.h:51
mongocxx::pool::entry m_pConnection
Definition: MongoDatabase.h:61
MongoDatabase(mongocxx::pool &connectionPool, const std::string &databaseName)
Creates a mongo database around connectionPool and databaseName.
Definition: MongoDatabase.h:34
Definition: AddressExtractionExtension.cpp:28
Represents a mongo database.
Definition: MongoDatabase.h:31