Go to the documentation of this file.
38 std::string
key()
const;
40 std::string
uri()
const;
50 const std::string& exportName,
64 std::optional<nlohmann::json>
documentExists(
const std::string&
id)
const;
71 bool createIfNotExistent =
false);
91 void setHost(
const std::string&);
92 void setPort(
const unsigned int);
93 void setUser(
const std::string&);
104 mongocxx::pool* getPool(
bool tryToConnect =
true)
const;
105 mongocxx::pool* ensurePool()
const;
108 static const constexpr
char*
ID =
"_id";
110 static const constexpr
char*
TYPE =
"_type";
111 static const constexpr
char*
DATA =
"_data";
112 static const constexpr
char*
METADATA =
"_metadata";
116 std::string exportName;
119 static std::unique_ptr<mongocxx::instance> MongoCXXInstance;
120 static std::atomic_bool MongoCXXInitialized;
121 static std::recursive_mutex MongoCXXConnectionPoolMutex;
122 static std::map<std::string, std::unique_ptr<mongocxx::pool>> MongoCXXConnectionPool;
std::optional< mongocxx::collection > collectionExists() const
void configureMixin(const nlohmann::json &json)
configuration
std::optional< mongocxx::database > databaseExists() const
std::vector< nlohmann::json > getAllDocuments() const
void setPassword(const std::string &)
std::optional< mongocxx::collection > previousCollectionExists() const
void setMixinMemoryID(const armem::MemoryID &)
setter
mongocxx::collection ensurePreviousCollectionExists(bool createIfNotExistent=false)
static const constexpr char * METADATA
void writeForeignKeyToPreviousDocument()
MongoDBSettings getSettings() const
std::string getCollectionName() const
void setUser(const std::string &)
void setMixinExportName(const std::string &n)
mongocxx::collection ensureCollectionExists(bool createIfNotExistent=false)
nlohmann::json ensureDocumentExists(bool createIfNotExistent=false)
static const constexpr char * FOREIGN_KEY
std::string baseUri() const
void initializeFromArmarXConfig()
Fills missing fields from armarx config file.
static const constexpr char * TYPE
void setHost(const std::string &)
std::string getDatabaseName() const
mongocxx::database ensureDatabaseExists(bool createIfNotExistent=false)
static const constexpr char * DATA
MongoDBStorageMixin()=default
void setPort(const unsigned int)
std::optional< nlohmann::json > documentExists() const
nlohmann::json readDataFromDocument() const
std::string toString() const
static const constexpr char * ID
void writeDataToDocument(const nlohmann::json &data)
std::string getDocumentName() const
std::string getPreviousCollectionName() const