2020-05-08 12:43:46 +02:00
|
|
|
#ifndef MSQL_ACCES_H
|
|
|
|
#define MSQL_ACCES_H
|
|
|
|
#include "data_acces.h"
|
|
|
|
|
|
|
|
#include <cppconn/driver.h>
|
|
|
|
#include <cppconn/exception.h>
|
|
|
|
#include <cppconn/resultset.h>
|
|
|
|
#include <cppconn/statement.h>
|
|
|
|
#include <cppconn/prepared_statement.h>
|
|
|
|
|
|
|
|
class msql_acces : public data_acces
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
msql_acces();
|
|
|
|
std::string get_passwd(std::string username);
|
2020-05-26 18:48:31 +02:00
|
|
|
bool get_admin(std::string);
|
2020-05-13 00:58:32 +02:00
|
|
|
std::list<std::string> get_pinfo();
|
2020-05-20 00:10:05 +02:00
|
|
|
std::list<std::string> get_uinfo();
|
2020-05-15 21:39:23 +02:00
|
|
|
void write_install(std::string package, std::string user);
|
|
|
|
void write_remove(std::string);
|
2020-05-16 20:52:50 +02:00
|
|
|
bool get_package_exists(std::string package);
|
2020-05-21 20:57:18 +02:00
|
|
|
void create_user(std::string user, std::string pass, bool admin);
|
2020-05-26 01:37:34 +02:00
|
|
|
void remove_user(std::string user);
|
2020-05-08 12:43:46 +02:00
|
|
|
private:
|
|
|
|
sql::Connection *con;
|
|
|
|
sql::Driver *driver;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MSQL_ACCES_H
|