From 498ad23eaaae1e856c71f44ad0bf3912a6d7e5b7 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 5 Aug 2024 03:00:48 +0900
Subject: feat(backend): wait for all players to enter

---
 backend/query.sql | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'backend/query.sql')

diff --git a/backend/query.sql b/backend/query.sql
index 39b0b21..245d5cf 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -38,6 +38,11 @@ LEFT JOIN problems ON games.problem_id = problems.problem_id
 WHERE games.game_id = $1
 LIMIT 1;
 
+-- name: ListGamePlayers :many
+SELECT * FROM game_players
+LEFT JOIN users ON game_players.user_id = users.user_id
+WHERE game_players.game_id = $1;
+
 -- name: UpdateGame :exec
 UPDATE games
 SET
-- 
cgit v1.3.1

