mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-26 19:17:43 +01:00
Removed UserUUIDTable#removeUser
This commit is contained in:
parent
5c8e8b0351
commit
975cb9d21f
@ -101,21 +101,6 @@ public class KillsTable extends UserUUIDTable {
|
||||
createTable(createTableSQL(db.getType()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUser(UUID uuid) {
|
||||
String sql = "DELETE FROM " + tableName +
|
||||
" WHERE " + KILLER_UUID + "=?" +
|
||||
" OR " + VICTIM_UUID + "=?";
|
||||
|
||||
execute(new ExecStatement(sql) {
|
||||
@Override
|
||||
public void prepare(PreparedStatement statement) throws SQLException {
|
||||
statement.setString(1, uuid.toString());
|
||||
statement.setString(2, uuid.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addKillsToSessions(UUID uuid, Map<Integer, Session> sessions) {
|
||||
String usersUUIDColumn = usersTable + "." + UsersTable.USER_UUID;
|
||||
String usersNameColumn = usersTable + "." + UsersTable.USER_NAME + " as victim_name";
|
||||
|
@ -17,13 +17,8 @@
|
||||
package com.djrapitops.plan.db.sql.tables;
|
||||
|
||||
import com.djrapitops.plan.db.SQLDB;
|
||||
import com.djrapitops.plan.db.access.ExecStatement;
|
||||
import com.djrapitops.plan.db.sql.parsing.Column;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Represents a Table that uses UUIDs to get their data.
|
||||
*
|
||||
@ -35,17 +30,6 @@ public abstract class UserUUIDTable extends Table {
|
||||
super(name, db);
|
||||
}
|
||||
|
||||
public void removeUser(UUID uuid) {
|
||||
String sql = "DELETE FROM " + tableName + " WHERE (" + Col.UUID + "=?)";
|
||||
|
||||
execute(new ExecStatement(sql) {
|
||||
@Override
|
||||
public void prepare(PreparedStatement statement) throws SQLException {
|
||||
statement.setString(1, uuid.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public enum Col implements Column {
|
||||
UUID("uuid");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user