Repository class for managing Team entities in the database.
More...
#include <team_repository.h>
Repository class for managing Team entities in the database.
◆ TeamRepository()
Construct a new Team Repository object.
- Parameters
-
| db_conn | Shared pointer to the database connection. |
◆ bindTeamParams()
| void TeamRepository::bindTeamParams |
( |
sqlite3_stmt * |
stmt, |
|
|
const Team & |
team, |
|
|
int |
startIndex |
|
) |
| const |
|
private |
◆ bindTeamStateParams()
| void TeamRepository::bindTeamStateParams |
( |
sqlite3_stmt * |
stmt, |
|
|
const Team & |
team |
|
) |
| const |
|
private |
◆ insertTeam()
| void TeamRepository::insertTeam |
( |
const Team & |
team | ) |
const |
Insert a new team into the database.
- Parameters
-
| team | The Team object to insert. |
◆ insertTeamsWithId()
| void TeamRepository::insertTeamsWithId |
( |
const std::vector< std::reference_wrapper< const Team > > & |
teams | ) |
const |
Insert multiple teams with specific IDs into the database.
- Parameters
-
| teams | A vector of reference wrappers to Team objects. |
◆ insertTeamWithId()
| void TeamRepository::insertTeamWithId |
( |
const Team & |
team | ) |
const |
Insert a team with a specific ID into the database.
- Parameters
-
| team | The Team object to insert. |
◆ loadAllLineups()
Load pointer-free lineup data so GameData can resolve player IDs.
◆ loadAllTeams()
| std::vector< Team > TeamRepository::loadAllTeams |
( |
| ) |
const |
Load all teams from the database.
- Returns
- A vector of Team objects.
◆ updateTeamsState()
| void TeamRepository::updateTeamsState |
( |
const std::vector< std::reference_wrapper< const Team > > & |
teams | ) |
const |
Persist multiple team states with one prepared statement.
◆ updateTeamState()
| void TeamRepository::updateTeamState |
( |
const Team & |
team | ) |
const |
Persist mutable team state without overwriting lineup data.
◆ db_conn
The documentation for this class was generated from the following files: