From 8fe370bd8f9920f769785c4e381272e6bcd5e7c2 Mon Sep 17 00:00:00 2001 From: Valerio Pastore Date: Thu, 11 Jan 2024 20:16:31 +0100 Subject: [PATCH 1/3] adding doxygen --- include/Mysql_Conf.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/Mysql_Conf.h b/include/Mysql_Conf.h index 2eace85..bbbf6fc 100644 --- a/include/Mysql_Conf.h +++ b/include/Mysql_Conf.h @@ -5,20 +5,42 @@ namespace inaf::oasbo::Configurators { +/** + * @brief A class that represents a MySQL configurator. + * + * This class is responsible for reading and pushing configurations to a MySQL database. + * It inherits from the BaseConfigurator class. Check Base_Configurator.h for more information. + */ + class MysqlConfigurator: public BaseConfigurator { protected: sql::mysql::MySQL_Driver *driver = nullptr; sql::Connection *con = nullptr; public: + /** + * @brief Constructs a MysqlConfigurator object with the specified parameters. + * + * @param ip The IP address of the MySQL server. + * @param port The port number of the MySQL server. + * @param username The username for connecting to the MySQL server. + * @param password The password for connecting to the MySQL server. + * @param dbname The name of the MySQL database. + */ MysqlConfigurator(std::string ip, int port, std::string username, std::string password, std::string dbname); + int readConfigFromSource() override; + int readConfigFromSource(std::string target) override; + int pushConfigToSource() override; + int pushConfigToSource(std::string target) override; + int insert(std::map, std::string target) override; + ~MysqlConfigurator() { if (con != nullptr) { con->close(); -- GitLab From 69f01f38c1a5fb3b6f234014dc8e05e681ab5ef4 Mon Sep 17 00:00:00 2001 From: valerio pastore Date: Thu, 11 Jan 2024 20:53:17 +0100 Subject: [PATCH 2/3] . --- deps/Base-DAQ | 2 +- include/Mysql_Conf.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/deps/Base-DAQ b/deps/Base-DAQ index 8a0ea2d..f81453c 160000 --- a/deps/Base-DAQ +++ b/deps/Base-DAQ @@ -1 +1 @@ -Subproject commit 8a0ea2d0e699863df5fe1c91caf2d7b0855957be +Subproject commit f81453c9f6d51b1cce2ce0507264c69f5dddc725 diff --git a/include/Mysql_Conf.h b/include/Mysql_Conf.h index bbbf6fc..d656ba2 100644 --- a/include/Mysql_Conf.h +++ b/include/Mysql_Conf.h @@ -30,7 +30,6 @@ public: MysqlConfigurator(std::string ip, int port, std::string username, std::string password, std::string dbname); - int readConfigFromSource() override; int readConfigFromSource(std::string target) override; -- GitLab From 3cf7397511847e3ffbf42a736aac74a97b131210 Mon Sep 17 00:00:00 2001 From: valerio pastore Date: Fri, 12 Jan 2024 20:16:41 +0100 Subject: [PATCH 3/3] . --- deps/Base-DAQ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/Base-DAQ b/deps/Base-DAQ index f81453c..a00f9a2 160000 --- a/deps/Base-DAQ +++ b/deps/Base-DAQ @@ -1 +1 @@ -Subproject commit f81453c9f6d51b1cce2ce0507264c69f5dddc725 +Subproject commit a00f9a27afbf5f75dab7db2368b9b9b6fcb395e1 -- GitLab