Switching to C++ #60

Merged
kdeng00 merged 36 commits from experiment into master 2019-09-03 16:17:20 -04:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit c55d8261a2 - Show all commits
+2
View File
@@ -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*);
+13
View File
@@ -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;