diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-21 11:37:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-21 11:37:48 +0900 |
| commit | 95903269b252729ee6573a5b607d98fa0223cd9a (patch) | |
| tree | cfed9b4320cb5c0f83364fbe8e5517b59bb10d73 /backend/query.sql | |
| parent | 4b58aed45bb2356786958b4ce10b62ede26dfdb3 (diff) | |
| download | phperkaigi-2025-albatross-95903269b252729ee6573a5b607d98fa0223cd9a.tar.gz phperkaigi-2025-albatross-95903269b252729ee6573a5b607d98fa0223cd9a.tar.zst phperkaigi-2025-albatross-95903269b252729ee6573a5b607d98fa0223cd9a.zip | |
fix(frontend): fix submission status flickering
Diffstat (limited to 'backend/query.sql')
| -rw-r--r-- | backend/query.sql | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/query.sql b/backend/query.sql index 32f9273..2d56c1c 100644 --- a/backend/query.sql +++ b/backend/query.sql @@ -156,6 +156,12 @@ VALUES ($1, $2, $3, $4) ON CONFLICT (game_id, user_id) DO UPDATE SET code = EXCLUDED.code; +-- name: UpdateCodeAndStatus :exec +INSERT INTO game_states (game_id, user_id, code, status) +VALUES ($1, $2, $3, $4) +ON CONFLICT (game_id, user_id) +DO UPDATE SET code = EXCLUDED.code, status = EXCLUDED.status; + -- name: CreateSubmission :one INSERT INTO submissions (game_id, user_id, code, code_size, status) VALUES ($1, $2, $3, $4, 'running') |
