first thoughts about database
This commit is contained in:
parent
1b9d5e4a7b
commit
03f38387e2
14 changed files with 255 additions and 20 deletions
24
database/mysql/mysql.h
Normal file
24
database/mysql/mysql.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue