mongodb.h File Reference
#include <map>
#include <memory>
#include <string>
#include <SimoxUtility/json.h>
#include <RobotAPI/libraries/armem/core/MemoryID.h>
#include <mongocxx/client.hpp>
#include <mongocxx/instance.hpp>
#include <mongocxx/pool.hpp>
#include <mongocxx/stdx.hpp>
#include <mongocxx/uri.hpp>
#include <bsoncxx/builder/stream/array.hpp>
#include <bsoncxx/builder/stream/document.hpp>
#include <bsoncxx/builder/stream/helpers.hpp>
#include <bsoncxx/json.hpp>
+ Include dependency graph for mongodb.h:
+ This graph shows which files directly or indirectly include this file:

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 std::string &vkey, const nlohmann::json &vdata)
 
void writeDataToDocument (mongocxx::collection &collection, const nlohmann::json &query, const nlohmann::json &update)
 

Variables

const std::map< std::string, std::string > EscapeTable = {{"/", "|"}}