Able to retrieve single and multiple records (Album, Artist, Genre, Year)

This commit is contained in:
kdeng00
2019-09-07 12:00:12 -04:00
parent e9241cf6a5
commit 7ec88397c0
15 changed files with 587 additions and 15 deletions
+6
View File
@@ -1,6 +1,8 @@
#ifndef ARTISTREPOSITORY_H_
#define ARTISTREPOSITORY_H_
#include <vector>
#include "database/BaseRepository.h"
#include "model/Models.h"
#include "type/ArtistFilter.h"
@@ -12,12 +14,16 @@ namespace database
public:
ArtistRepository(const model::BinaryPath&);
std::vector<model::Artist> retrieveRecords();
model::Artist retrieveRecord(model::Artist&, type::ArtistFilter);
bool doesArtistExist(const model::Artist&, type::ArtistFilter);
void saveRecord(const model::Artist&);
private:
std::vector<model::Artist> parseRecords(MYSQL_STMT*);
// TODO: After parseRecord(MYSQL_STMT*) is implemented
// remove parseRecord(MYSQL_RES*)
model::Artist parseRecord(MYSQL_RES*);