Skip to content
GitLab
Explore
Sign in
BIAS
Configurators
Mysql Configurator
Compare revisions
ebbb0f36843dd8f58e3b0442bfe5078732b3e022 to 8b1beb8728fef15d377dea2ce4f432c58697f7cc
Commits on Source (4)
adding doxygen
· 8fe370bd
Valerio Pastore
authored
Jan 11, 2024
8fe370bd
.
· 69f01f38
Valerio Pastore
authored
Jan 11, 2024
69f01f38
.
· 3cf73975
Valerio Pastore
authored
Jan 12, 2024
3cf73975
Merge branch 'dev' into 'main'
· 8b1beb87
Valerio Pastore
authored
Jan 14, 2024
Dev See merge request
!1
8b1beb87
Hide whitespace changes
Inline
Side-by-side
Base-DAQ
@
a00f9a27
Compare
8a0ea2d0
...
a00f9a27
Subproject commit
8
a0
ea2d0e699863df5fe1c91caf2d7b0855957be
Subproject commit a0
0f9a27afbf5f75dab7db2368b9b9b6fcb395e1
include/Mysql_Conf.h
View file @
8b1beb87
...
...
@@ -5,20 +5,41 @@
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
,
std
::
string
>
,
std
::
string
target
)
override
;
~
MysqlConfigurator
()
{
if
(
con
!=
nullptr
)
{
con
->
close
();
...
...