Implemented deletion functionality, and lingering records are removed fixes #49
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef ARTISTREPOSITORY_H_
|
||||
#define ARTISTREPOSITORY_H_
|
||||
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "database/BaseRepository.h"
|
||||
@@ -16,14 +17,19 @@ namespace database
|
||||
|
||||
std::vector<model::Artist> retrieveRecords();
|
||||
|
||||
std::pair<model::Artist, int> retrieveRecordWithSongCount(model::Artist&, type::ArtistFilter);
|
||||
|
||||
model::Artist retrieveRecord(model::Artist&, type::ArtistFilter);
|
||||
|
||||
bool doesArtistExist(const model::Artist&, type::ArtistFilter);
|
||||
|
||||
void saveRecord(const model::Artist&);
|
||||
void deleteArtist(const model::Artist&, type::ArtistFilter);
|
||||
private:
|
||||
std::vector<model::Artist> parseRecords(MYSQL_STMT*);
|
||||
|
||||
std::pair<model::Artist, int> parseRecordWithSongCount(MYSQL_STMT*);
|
||||
|
||||
// TODO: After parseRecord(MYSQL_STMT*) is implemented
|
||||
// remove parseRecord(MYSQL_RES*)
|
||||
model::Artist parseRecord(MYSQL_RES*);
|
||||
|
||||
Reference in New Issue
Block a user