Skip to content

Commit d71c24c

Browse files
committed
SQLで小文字化が抜けていた部分を修正した。
1 parent 6076b1c commit d71c24c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

atcoder-problems-backend/sql-client/src/submission_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl SubmissionClient for PgPool {
121121
r"
122122
SELECT * FROM submissions
123123
WHERE result = 'AC'
124-
AND LOWER(user_id) = ANY($1)
124+
AND LOWER(user_id) = ANY(SELECT LOWER(u) FROM UNNEST($1) AS a(u))
125125
",
126126
)
127127
.bind(user_ids)
@@ -163,7 +163,7 @@ impl SubmissionClient for PgPool {
163163
} => sqlx::query_as(
164164
r"
165165
SELECT * FROM submissions
166-
WHERE LOWER(user_id) = ANY($1)
166+
WHERE LOWER(user_id) = ANY(SELECT LOWER(u) FROM UNNEST($1) AS a(u))
167167
AND problem_id = ANY($2)
168168
AND epoch_second >= $3
169169
AND epoch_second <= $4

0 commit comments

Comments
 (0)