File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
atcoder-problems-backend/sql-client/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ impl LanguageCountClient for PgPool {
150
150
let count = sqlx:: query_as (
151
151
r"
152
152
SELECT user_id, simplified_language, problem_count FROM language_count
153
- WHERE user_id = $1
153
+ WHERE LOWER( user_id) = LOWER($1)
154
154
ORDER BY simplified_language
155
155
" ,
156
156
)
@@ -171,7 +171,7 @@ impl LanguageCountClient for PgPool {
171
171
OVER(PARTITION BY simplified_language ORDER BY problem_count DESC) AS rank
172
172
FROM language_count
173
173
)
174
- AS s2 WHERE user_id = $1
174
+ AS s2 WHERE LOWER( user_id) = LOWER($1)
175
175
ORDER BY simplified_language
176
176
" ,
177
177
)
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl SubmissionClient for PgPool {
121
121
r"
122
122
SELECT * FROM submissions
123
123
WHERE result = 'AC'
124
- AND user_id = ANY($1)
124
+ AND LOWER( user_id) = ANY($1)
125
125
" ,
126
126
)
127
127
. bind ( user_ids)
@@ -163,7 +163,7 @@ impl SubmissionClient for PgPool {
163
163
} => sqlx:: query_as (
164
164
r"
165
165
SELECT * FROM submissions
166
- WHERE user_id = ANY($1)
166
+ WHERE LOWER( user_id) = ANY($1)
167
167
AND problem_id = ANY($2)
168
168
AND epoch_second >= $3
169
169
AND epoch_second <= $4
You can’t perform that action at this time.
0 commit comments