pica/database/mysql/mysql.h

25 lines
516 B
C++

#pragma once
#include <stdexcept>
#include <mysql.h>
#include "database/dbinterface.h"
class MySQL : public DBInterface {
public:
MySQL();
~MySQL() override;
void connect(const std::string& path) override;
void disconnect() override;
void setCredentials(const std::string& login, const std::string& password) override;
void setDatabase(const std::string& database) override;
protected:
MYSQL connection;
std::string login;
std::string password;
std::string database;
};