Repository class for managing Match and Calendar entities in the database, plus the per-fixture match reports.
More...
#include <fixture_repository.h>
Repository class for managing Match and Calendar entities in the database, plus the per-fixture match reports.
◆ FixtureRepository()
Construct a new Fixture Repository object.
- Parameters
-
| db_conn | Shared pointer to the database connection. |
◆ insertFixture()
| void FixtureRepository::insertFixture |
( |
const Match & |
match | ) |
const |
Insert a match fixture into the database.
- Parameters
-
| match | The Match object to insert. |
◆ loadAllMatches()
| std::vector< Match > FixtureRepository::loadAllMatches |
( |
| ) |
const |
Load all matches from the database.
- Returns
- A vector of Match objects.
◆ loadCalendar()
| void FixtureRepository::loadCalendar |
( |
Calendar & |
calendar | ) |
const |
Load the calendar from the database.
- Parameters
-
| calendar | The Calendar object to populate. |
◆ loadMatchReport()
Loads the report of one fixture, if it was stored.
◆ loadTeamMatchReports()
| std::vector< MatchReport > FixtureRepository::loadTeamMatchReports |
( |
uint16_t |
season, |
|
|
TeamID |
team_id |
|
) |
| const |
Loads all stored reports of a team in a season, by date.
◆ saveCalendar()
| void FixtureRepository::saveCalendar |
( |
const Calendar & |
calendar | ) |
const |
Save the calendar to the database.
- Parameters
-
◆ saveMatchReports()
| void FixtureRepository::saveMatchReports |
( |
const std::vector< MatchReport > & |
reports | ) |
const |
Inserts or replaces match reports (keyed by date and teams).
◆ db_conn
The documentation for this class was generated from the following files: