Read max score for all players in one shot as well, with a new query and an index...
[ccbs] / bigscreen / fetch_max_score_for_players.h
1 #ifndef _FETCH_MAX_SCORE_FOR_PLAYERS_H
2 #define _FETCH_MAX_SCORE_FOR_PLAYERS_H 1
3
4 #include <pqxx/transactor>
5 #include <map>
6
7 /* A transactor that fetches the maximum score for each player on chosen songs */
8 class FetchMaxScoreForPlayers : public pqxx::transactor<> {
9 private:
10         unsigned tournament, round;
11         std::map<unsigned, unsigned> *scores;
12
13 public:
14         FetchMaxScoreForPlayers(unsigned tournament, unsigned round, std::map<unsigned, unsigned> *scores);
15         void operator() (pqxx::transaction<> &t);
16 };
17
18 #endif /* !defined(_FETCH_MAX_SCORE_FOR_PLAYERS_H) */