From 7f06648cf2f5cb63a52465f1b57a081a1ed7e0ea Mon Sep 17 00:00:00 2001
From: Claude <noreply@anthropic.com>
Date: Fri, 20 Mar 2026 01:49:35 +0000
Subject: 提出結果の取得を最新50件に制限
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

プレイ画面の提出結果一覧が際限なく増えるのを防ぐため、
GetSubmissionsByGameIDAndUserID クエリに LIMIT 50 を追加。

https://claude.ai/code/session_015rm8yZD4va9hRH429u9N6q
---
 backend/query.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'backend/query.sql')

diff --git a/backend/query.sql b/backend/query.sql
index c791c27..1c0a8fd 100644
--- a/backend/query.sql
+++ b/backend/query.sql
@@ -262,7 +262,8 @@ WHERE testcase_id = $1;
 -- name: GetSubmissionsByGameIDAndUserID :many
 SELECT * FROM submissions
 WHERE game_id = $1 AND user_id = $2
-ORDER BY created_at DESC;
+ORDER BY created_at DESC
+LIMIT 50;
 
 -- name: GetSubmissionsByGameID :many
 SELECT *
-- 
cgit v1.3.1

