Switching to C++ #60
@@ -18,6 +18,8 @@ namespace Database
|
|||||||
|
|
||||||
Model::Album retrieveRecord(Model::Album&, Type::albumFilter);
|
Model::Album retrieveRecord(Model::Album&, Type::albumFilter);
|
||||||
|
|
||||||
|
bool doesAlbumExists(const Model::Album&, Type::albumFilter);
|
||||||
|
|
||||||
void saveAlbum(const Model::Album&);
|
void saveAlbum(const Model::Album&);
|
||||||
private:
|
private:
|
||||||
std::vector<Model::Album> parseRecords(MYSQL_RES*);
|
std::vector<Model::Album> parseRecords(MYSQL_RES*);
|
||||||
|
|||||||
@@ -53,6 +53,19 @@ Model::Album Database::albumRepository::retrieveRecord(Model::Album& album, Type
|
|||||||
return album;
|
return album;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Database::albumRepository::doesAlbumExists(const Model::Album& album, Type::albumFilter filter)
|
||||||
|
{
|
||||||
|
// TODO: continue working on this part.
|
||||||
|
// Reason: there should be a check to see if an album record already exists
|
||||||
|
// at the moment there is no check and every time a song is uploaded
|
||||||
|
// a new album record is created, even for songs that are on the
|
||||||
|
// same album. This should not happen. There should be one album
|
||||||
|
// record for songs on the same album. After fixing this, do the
|
||||||
|
// same for Artist, Genre, and Year records
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Database::albumRepository::saveAlbum(const Model::Album& album)
|
void Database::albumRepository::saveAlbum(const Model::Album& album)
|
||||||
{
|
{
|
||||||
std::cout << "beginning to insert album record" << std::endl;
|
std::cout << "beginning to insert album record" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user