Skip to content

Commit

Permalink
fix sql query for validator name search
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Aug 16, 2024
1 parent 09d6691 commit b27a1bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,15 @@ func SearchAhead(w http.ResponseWriter, r *http.Request) {
dbtypes.DBEnginePgsql: `
SELECT name, count(*) as count
FROM validator_names
LEFT JOIN slot_assignments ON validator_names."index" = slot_assignments.proposer
LEFT JOIN slots ON validator_names."index" = slots.proposer
WHERE name ILIKE LOWER($1)
GROUP BY name
ORDER BY count desc
LIMIT 10`,
dbtypes.DBEngineSqlite: `
SELECT name, count(*) as count
FROM validator_names
LEFT JOIN slot_assignments ON validator_names."index" = slot_assignments.proposer
LEFT JOIN slots ON validator_names."index" = slots.proposer
WHERE name LIKE LOWER($1)
GROUP BY name
ORDER BY count desc
Expand Down

0 comments on commit b27a1bf

Please sign in to comment.