mongodb.cpp File Reference
+ Include dependency graph for mongodb.cpp:

Go to the source code of this file.

Namespaces

 armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 
 armarx::armem
 
 armarx::armem::server
 
 armarx::armem::server::ltm
 
 armarx::armem::server::ltm::util
 
 armarx::armem::server::ltm::util::mongodb
 
 armarx::armem::server::ltm::util::mongodb::detail
 

Functions

std::optional< mongocxx::collection > collectionExists (mongocxx::database &db, const std::string &collectionName)
 
std::optional< nlohmann::json > contains (mongocxx::collection &coll, const nlohmann::json &value)
 
std::optional< mongocxx::database > databaseExists (mongocxx::client &client, const std::string &databaseName)
 
std::optional< nlohmann::json > documentExists (mongocxx::collection &collection, const nlohmann::json &json)
 
mongocxx::collection ensureCollectionExists (mongocxx::database &db, const std::string &collectionName, bool createIfNotExistent)
 
mongocxx::database ensureDatabaseExists (mongocxx::client &client, const std::string &databaseName, bool createIfNotExistent)
 
nlohmann::json ensureDocumentExists (mongocxx::collection &collection, const nlohmann::json &json, bool createIfNotExistent)
 
std::string escapeName (const std::string &segmentName)
 
std::vector< nlohmann::json > getAllDocuments (mongocxx::collection &collection)
 
bool insert (mongocxx::collection &coll, const nlohmann::json &value)
 
nlohmann::json readDataFromDocument (mongocxx::collection &collection, const nlohmann::json &json)
 
std::string toCollectionName (const armem::MemoryID &id)
 
std::string toDocumentID (const armem::MemoryID &id)
 
std::string unescapeName (const std::string &escapedName)
 
bool update (mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
 
void writeDataToDocument (mongocxx::collection &collection, const nlohmann::json &query, const nlohmann::json &update)