diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-11 20:39:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-11 20:39:48 +0900 |
| commit | 125e26b4d5c986f8531c098ecd5d291c1e1c7a76 (patch) | |
| tree | fee5d641a05dc972a6b80fb3620d156f13d9b137 /backend/query.sql | |
| parent | e3502d9e649fe61bb0ba4046b2c23c0d78bc92e9 (diff) | |
| download | phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.tar.gz phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.tar.zst phperkaigi-2025-albatross-125e26b4d5c986f8531c098ecd5d291c1e1c7a76.zip | |
feat(backend): make `games.problem_id` non-null
Diffstat (limited to 'backend/query.sql')
| -rw-r--r-- | backend/query.sql | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/query.sql b/backend/query.sql index bcbee12..408bf2d 100644 --- a/backend/query.sql +++ b/backend/query.sql @@ -30,12 +30,12 @@ SELECT EXISTS ( -- name: ListGames :many SELECT * FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id ORDER BY games.game_id; -- name: ListGamesForPlayer :many SELECT * FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id JOIN game_players ON games.game_id = game_players.game_id WHERE game_players.user_id = $1 ORDER BY games.game_id; @@ -52,7 +52,7 @@ WHERE game_id = $1; -- name: GetGameByID :one SELECT * FROM games -LEFT JOIN problems ON games.problem_id = problems.problem_id +JOIN problems ON games.problem_id = problems.problem_id WHERE games.game_id = $1 LIMIT 1; |
