|
Player12
An open source football management simulator
|
Persists season history and per-player season statistics. More...
#include <competition_repository.h>
Public Member Functions | |
| CompetitionRepository (std::shared_ptr< DatabaseConnection > db_conn) | |
| void | saveSeasonHistory (const std::vector< SeasonHistoryEntry > &entries) const |
| Inserts or replaces history rows (season, type, competition). | |
| std::vector< SeasonHistoryEntry > | loadSeasonHistory () const |
| Loads all history rows ordered by season then competition. | |
| void | savePlayerSeasonStats (const PlayerSeasonTable &table) const |
| Inserts or replaces the given player season rows. | |
| PlayerSeasonTable | loadPlayerSeasonStats (uint16_t season) const |
| Loads the player season rows of one season. | |
| std::vector< PlayerSeasonStats > | loadPlayerCareer (PlayerID player_id) const |
| Loads every season row of a player (career history). | |
| void | saveDiscipline (const std::vector< DisciplinaryRecord > &records) const |
| Replaces all stored disciplinary records. | |
| std::vector< DisciplinaryRecord > | loadDiscipline () const |
Private Attributes | |
| std::shared_ptr< DatabaseConnection > | db_conn |
Persists season history and per-player season statistics.
|
explicit |
| std::vector< DisciplinaryRecord > CompetitionRepository::loadDiscipline | ( | ) | const |
| std::vector< PlayerSeasonStats > CompetitionRepository::loadPlayerCareer | ( | PlayerID | player_id | ) | const |
Loads every season row of a player (career history).
| PlayerSeasonTable CompetitionRepository::loadPlayerSeasonStats | ( | uint16_t | season | ) | const |
Loads the player season rows of one season.
| std::vector< SeasonHistoryEntry > CompetitionRepository::loadSeasonHistory | ( | ) | const |
Loads all history rows ordered by season then competition.
| void CompetitionRepository::saveDiscipline | ( | const std::vector< DisciplinaryRecord > & | records | ) | const |
Replaces all stored disciplinary records.
| void CompetitionRepository::savePlayerSeasonStats | ( | const PlayerSeasonTable & | table | ) | const |
Inserts or replaces the given player season rows.
| void CompetitionRepository::saveSeasonHistory | ( | const std::vector< SeasonHistoryEntry > & | entries | ) | const |
Inserts or replaces history rows (season, type, competition).
|
private |