Tidied up code, going to put up the coding convention later on

This commit is contained in:
amazing-username
2019-09-04 15:41:43 +00:00
parent dd995269df
commit d4e9b8c71f
73 changed files with 1334 additions and 1368 deletions
+38
View File
@@ -0,0 +1,38 @@
#ifndef SONGREPOSITORY_H_
#define SONGREPOSITORY_H_
#include <memory>
#include <vector>
#include <mysql/mysql.h>
#include "database/BaseRepository.h"
#include "model/Models.h"
#include "type/SongFilter.h"
namespace database
{
class SongRepository : public BaseRepository
{
public:
SongRepository(const std::string&);
SongRepository(const model::BinaryPath&);
std::vector<model::Song> retrieveRecords();
bool doesSongExist(const model::Song&, type::SongFilter);
model::Song retrieveRecord(model::Song&, type::SongFilter);
void deleteRecord(const model::Song&);
void saveRecord(const model::Song&);
private:
std::vector<model::Song> parseRecords(MYSQL_RES*); // TODO: to be removed
std::vector<model::Song> parseRecords(MYSQL_STMT*);
model::Song parseRecord(MYSQL_RES*); // TODO: to be removed
model::Song parseRecord(MYSQL_STMT*);
};
}
#endif