Able to retrieve single and multiple records (Album, Artist, Genre, Year)
This commit is contained in:
@@ -22,7 +22,7 @@ namespace database
|
||||
|
||||
void saveAlbum(const model::Album&);
|
||||
private:
|
||||
std::vector<model::Album> parseRecords(MYSQL_RES*);
|
||||
std::vector<model::Album> parseRecords(MYSQL_STMT*);
|
||||
|
||||
// TODO: after parseRecord(MYSQL_STMT*) is implemented remove
|
||||
// parseRecord(MYSQL_RES*)
|
||||
|
||||
@@ -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*);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef GENREREPOSITORY_H_
|
||||
#define GENREREPOSITORY_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "database/BaseRepository.h"
|
||||
#include "model/Models.h"
|
||||
#include "type/GenreFilter.h"
|
||||
@@ -12,12 +14,16 @@ namespace database
|
||||
public:
|
||||
GenreRepository(const model::BinaryPath&);
|
||||
|
||||
std::vector<model::Genre> retrieveRecords();
|
||||
|
||||
model::Genre retrieveRecord(model::Genre&, type::GenreFilter);
|
||||
|
||||
bool doesGenreExist(const model::Genre&, type::GenreFilter);
|
||||
|
||||
void saveRecord(const model::Genre&);
|
||||
private:
|
||||
std::vector<model::Genre> parseRecords(MYSQL_STMT*);
|
||||
|
||||
// TODO: After parseRecord(MYSQL_STMT*) is implemented
|
||||
// remove parseRecord(MYSQL_RES*)
|
||||
model::Genre parseRecord(MYSQL_RES*);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef YEARREPOSITORY_H_
|
||||
#define YEARREPOSITORY_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "database/BaseRepository.h"
|
||||
#include "model/Models.h"
|
||||
#include "type/YearFilter.h"
|
||||
@@ -12,12 +14,16 @@ namespace database
|
||||
public:
|
||||
YearRepository(const model::BinaryPath&);
|
||||
|
||||
std::vector<model::Year> retrieveRecords();
|
||||
|
||||
model::Year retrieveRecord(model::Year&, type::YearFilter);
|
||||
|
||||
bool doesYearExist(const model::Year&, type::YearFilter);
|
||||
|
||||
void saveRecord(const model::Year&);
|
||||
private:
|
||||
std::vector<model::Year> parseRecords(MYSQL_STMT*);
|
||||
|
||||
// TODO: After parseRecord(MYSQL_STMT*) is implemented
|
||||
// remove parseRecord(MYSQL_RES*)
|
||||
model::Year parseRecord(MYSQL_RES*);
|
||||
|
||||
Reference in New Issue
Block a user