Remove SchemElo and UserElo

This commit is contained in:
2025-12-20 21:26:42 +01:00
parent ac5dda58a1
commit b517fe3ad0
2 changed files with 1 additions and 71 deletions
+1 -10
View File
@@ -61,17 +61,8 @@ private val fightCount = "SELECT COUNT(*) AS num FROM FightPlayer WHERE UserID =
fun getFightCount(user: SteamwarUser) =
useDb { exec(fightCount, args = listOf(IntegerColumnType() to user.getId())) { getNum(it) } }
private const val rankedList =
"SELECT UserName, Elo FROM UserData, UserElo WHERE UserID = id AND GameMode = ? AND Season = ? ORDER BY Elo DESC"
fun getRankedList(gamemode: String): List<Pair<String, Int>> = useDb {
exec(rankedList, args = listOf(VarCharColumnType() to gamemode, IntegerColumnType() to Season.getSeason())) {
val list = mutableListOf<Pair<String, Int>>()
while (it.next()) {
list.add(it.getString("UserName") to it.getInt("Elo"))
}
list
} ?: emptyList()
emptyList()
}
private const val fightList =