aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/query.sql
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-17 00:45:46 +0900
committernsfisis <nsfisis@gmail.com>2025-09-17 00:45:46 +0900
commit611d93ea8a5dcc7dd92ec412e8fb28078438b31b (patch)
tree9b08446290e60af9bcda7547ece21e8dc6c40e76 /backend/query.sql
parenta49e0b2fc1a59b54043b9ca93828346c027973eb (diff)
downloadiosdc-japan-2025-albatross-611d93ea8a5dcc7dd92ec412e8fb28078438b31b.tar.gz
iosdc-japan-2025-albatross-611d93ea8a5dcc7dd92ec412e8fb28078438b31b.tar.zst
iosdc-japan-2025-albatross-611d93ea8a5dcc7dd92ec412e8fb28078438b31b.zip
feat(backend): add admin pages for submissions
Diffstat (limited to 'backend/query.sql')
-rw-r--r--backend/query.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/backend/query.sql b/backend/query.sql
index 9baf593..0d84652 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -258,3 +258,21 @@ WHERE testcase_id = $1;
-- name: DeleteTestcase :exec
DELETE FROM testcases
WHERE testcase_id = $1;
+
+-- name: GetSubmissionsByGameID :many
+SELECT *
+FROM submissions
+WHERE game_id = $1
+ORDER BY created_at DESC;
+
+-- name: GetSubmissionByID :one
+SELECT *
+FROM submissions
+WHERE submission_id = $1
+LIMIT 1;
+
+-- name: GetTestcaseResultsBySubmissionID :many
+SELECT *
+FROM testcase_results
+WHERE submission_id = $1
+ORDER BY created_at;