Working on interfacing with the database. Could do queryies via string/cstring but I'm going to try prepared statements
This commit is contained in:
@@ -10,11 +10,19 @@
|
||||
class base_repository
|
||||
{
|
||||
public:
|
||||
base_repository();
|
||||
base_repository(const std::string&);
|
||||
protected:
|
||||
MYSQL* setup_mysql_connection();
|
||||
MYSQL* setup_mysql_connection(database_connection);
|
||||
|
||||
MYSQL_RES* perform_mysql_query(MYSQL*, const std::string&);
|
||||
|
||||
database_connection details;
|
||||
private:
|
||||
void intitalizeDetails();
|
||||
|
||||
std::string path;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
|
||||
#include <mysql/mysql.h>
|
||||
|
||||
#include "database/base_repository.h"
|
||||
#include "models/models.h"
|
||||
|
||||
class coverArtRepository
|
||||
class coverArtRepository : public base_repository
|
||||
{
|
||||
public:
|
||||
coverArtRepository(const std::string&);
|
||||
|
||||
void saveRecord(const Cover&);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#ifndef COVERARTMANAGER_H_
|
||||
#define COVERARTMANAGER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "models/models.h"
|
||||
|
||||
class coverArtManager
|
||||
{
|
||||
public:
|
||||
coverArtManager(const std::string&);
|
||||
|
||||
Cover saveCover(const Song&, std::string&, const std::string&);
|
||||
private:
|
||||
std::string path;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,13 +13,6 @@ class song_manager
|
||||
public:
|
||||
song_manager(std::string&);
|
||||
|
||||
/**
|
||||
std::string retrieveMusicPath();
|
||||
std::string retrieveTempPath();
|
||||
*/
|
||||
|
||||
//nlohmann::json pathConfigContent();
|
||||
|
||||
void saveSong(Song&);
|
||||
|
||||
static void printSong(const Song&);
|
||||
|
||||
Reference in New Issue
Block a user