forked from SteamWar/SteamWar
Remove SchemElo and UserElo
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user