]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fetch_group.h
Add beginning code for fetching groups.
[ccbs] / bigscreen / fetch_group.h
diff --git a/bigscreen/fetch_group.h b/bigscreen/fetch_group.h
new file mode 100644 (file)
index 0000000..78b943e
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef _FETCH_GROUP_H
+#define _FETCH_GROUP_H 1
+
+#include <pqxx/transactor>
+#include "group.h"
+
+/* A transactor that fetches a group, all its scores etc. */
+class FetchGroup : public pqxx::transactor<> {
+private:
+       unsigned tournament, round, parallel;
+       Group *dest_group;
+       Group curr_group;
+
+public:
+       FetchGroup(unsigned tournament, unsigned round, unsigned parallel, Group *group);
+       void operator() (pqxx::transaction<> &t);
+       void OnCommit();
+};
+
+#endif /* !defined(_FETCH_CURRENT_TOURNAMENT_H) */