19 #ifndef NAF_QUERY_DATABASE_MANAGER
20 #define NAF_QUERY_DATABASE_MANAGER
28 #include "Poco/Exception.h"
29 #include "Poco/Data/Session.h"
30 #include "Poco/Data/MySQL/Connector.h"
31 #include <Poco/Data/MySQL/MySQLException.h>
32 #include <Poco/Data/Statement.h>
39 class DatabaseManager;
44 using namespace Poco::Data;
45 using namespace Poco::Data::Keywords;
61 Credentials(std::string db_host, std::string db_port, std::string db_name, std::string db_user, std::string db_password) :
66 ,db_password(db_password)
72 db_host = credentials.db_host;
73 db_port = credentials.db_port;
74 db_name = credentials.db_name;
75 db_user = credentials.db_user;
76 db_password = credentials.db_password;
79 std::string db_host, db_port, db_name, db_user, db_password;
85 static void StartMySQL_();
86 static void StopMySQL_();
87 static std::shared_ptr<Data::Session> StartSessionMySQL_(
Credentials& credentials);
90 static bool initialized_;
Definition: database_manager.h:48
Definition: database_manager.h:51