1 #ifndef _ots_DatabaseConfigurationInterface_h_
2 #define _ots_DatabaseConfigurationInterface_h_
4 #include "otsdaq/ConfigurationInterface/ConfigurationInterface.h"
21 using table_version_map_t = std::map<std::string ,
TableVersion >;
26 bool IS_FILESYSTEM_DB =
true;
44 std::set<TableGroupKey>
getKeys (
const std::string& groupName)
const override;
50 table_version_map_t
getTableGroupMembers (std::string
const& tableGroup,
bool includeMetaDataTable =
false)
const override;
53 void saveTableGroup (table_version_map_t
const& memberMap, std::string
const& tableGroup)
const override;
55 std::pair<std::string, TableVersion>
saveCustomJSON (
const std::string& JSON,
const std::string& documentNameToSave)
const override;
59 table_version_map_t getCachedTableGroupMembers(std::string
const& tableGroup)
const;
60 void saveTableGroupMemberCache(table_version_map_t
const& memberMap, std::string
const& tableGroup)
const;
void saveTableGroup(table_version_map_t const &memberMap, std::string const &tableGroup) const override
create a new table group from the contents map
TableVersion findLatestVersion(const TableBase *table) const noexcept override
find the latest table version by table type
table_version_map_t getTableGroupMembers(std::string const &tableGroup, bool includeMetaDataTable=false) const override
return the contents of a table group
std::set< std::string > getAllTableGroupNames(std::string const &filterString="") const override
find all table groups in database
std::set< TableGroupKey > getKeys(const std::string &groupName) const override
find all configuration groups in database
std::set< std::string > findGroupsWithTable(std::string const &tableName, TableVersion version) const override
std::string loadCustomJSON(const std::string &documentNameToLoad, TableVersion documentVersionToLoad) const override
Load a document in the document database and return content as a json string.
std::pair< std::string, TableVersion > saveCustomJSON(const std::string &JSON, const std::string &documentNameToSave) const override
Save a json string as a document in the document database.
std::set< TableVersion > getVersions(const TableBase *table) const noexcept override
find all table versions by table type
std::set< std::string > getAllTableNames(void) const override
returns a list of all table names
void fill(TableBase *table, TableVersion version) const override
read table from database
TableGroupKey findLatestGroupKey(const std::string &groupName) const noexcept override
void saveActiveVersion(const TableBase *table, bool overwrite=false) const override
write table to database
defines used also by OtsConfigurationWizardSupervisor