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 {
150150 let count = sqlx:: query_as (
151151 r"
152152 SELECT user_id, simplified_language, problem_count FROM language_count
153- WHERE user_id = $1
153+ WHERE LOWER( user_id) = LOWER($1)
154154 ORDER BY simplified_language
155155 " ,
156156 )
@@ -171,7 +171,7 @@ impl LanguageCountClient for PgPool {
171171 OVER(PARTITION BY simplified_language ORDER BY problem_count DESC) AS rank
172172 FROM language_count
173173 )
174- AS s2 WHERE user_id = $1
174+ AS s2 WHERE LOWER( user_id) = LOWER($1)
175175 ORDER BY simplified_language
176176 " ,
177177 )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl SubmissionClient for PgPool {
121121 r"
122122 SELECT * FROM submissions
123123 WHERE result = 'AC'
124- AND user_id = ANY($1)
124+ AND LOWER( user_id) = ANY($1)
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 user_id = ANY($1)
166+ WHERE LOWER( user_id) = ANY($1)
167167 AND problem_id = ANY($2)
168168 AND epoch_second >= $3
169169 AND epoch_second <= $4
You can’t perform that action at this time.
0 commit comments