#ifndef ALBUMREPOSITORY_H_ #define ALBUMREPOSITORY_H_ #include #include #include "database/BaseRepository.h" #include "model/Models.h" #include "type/AlbumFilter.h" namespace database { class AlbumRepository : public BaseRepository { public: AlbumRepository(const model::BinaryPath&); std::vector retrieveRecords(); std::pair retrieveRecordWithSongCount(model::Album&, type::AlbumFilter); model::Album retrieveRecord(model::Album&, type::AlbumFilter); bool doesAlbumExists(const model::Album&, type::AlbumFilter); void saveAlbum(const model::Album&); void deleteAlbum(const model::Album&, type::AlbumFilter); private: std::vector parseRecords(MYSQL_STMT*); std::pair parseRecordWithSongCount(MYSQL_STMT*); // TODO: after parseRecord(MYSQL_STMT*) is implemented remove // parseRecord(MYSQL_RES*) model::Album parseRecord(MYSQL_RES*); model::Album parseRecord(MYSQL_STMT*); }; } #endif