Omni Replay #236
@ -30,13 +30,13 @@ public class FightPlayer {
|
||||
if(fightIds.isEmpty())
|
||||
return fightPlayers;
|
||||
|
||||
Statement batch = new Statement("SELECT * FROM FightPlayer WHERE FightID IN (" + fightIds.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")");
|
||||
batch.select(rs -> {
|
||||
while(rs.next())
|
||||
fightPlayers.add(new FightPlayer(rs));
|
||||
return null;
|
||||
});
|
||||
batch.close();
|
||||
try (Statement batch = new Statement("SELECT * FROM FightPlayer WHERE FightID IN (" + fightIds.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")")) {
|
||||
Lixfel markierte diese Unterhaltung als gelöst
Veraltet
|
||||
batch.select(rs -> {
|
||||
while(rs.next())
|
||||
fightPlayers.add(new FightPlayer(rs));
|
||||
return null;
|
||||
});
|
||||
}
|
||||
return fightPlayers;
|
||||
}
|
||||
|
||||
|
@ -193,13 +193,13 @@ public class SteamwarUser {
|
||||
if(ids.isEmpty())
|
||||
return;
|
||||
|
||||
Statement batch = new Statement("SELECT * FROM UserData WHERE id IN (" + ids.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")");
|
||||
batch.select(rs -> {
|
||||
while(rs.next())
|
||||
new SteamwarUser(rs);
|
||||
return null;
|
||||
});
|
||||
batch.close();
|
||||
try (Statement batch = new Statement("SELECT * FROM UserData WHERE id IN (" + ids.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")")) {
|
||||
Lixfel markierte diese Unterhaltung als gelöst
Veraltet
YoyoNow
hat
Hier draus könntest du ein try with resources machen, da Statement nun AutoCloseable ist. Hier draus könntest du ein try with resources machen, da Statement nun AutoCloseable ist.
|
||||
batch.select(rs -> {
|
||||
while (rs.next())
|
||||
new SteamwarUser(rs);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static SteamwarUser get(Long discordId) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Hier draus könntest du ein try with resources machen, da Statement nun AutoCloseable ist.