add auto commit to the delete items bit

Took 43 seconds
This commit is contained in:
Kiran Hart 2022-04-18 13:22:56 -04:00
parent e63fcccbf8
commit 40c1447372

View File

@ -509,6 +509,7 @@ public class DataManager extends DataManagerAbstract {
public void deleteItems(Collection<UUID> items) {
this.async(() -> this.databaseConnector.connect(connection -> {
connection.setAutoCommit(false);
PreparedStatement statement = connection.prepareStatement("DELETE FROM " + this.getTablePrefix() + "auctions WHERE id = ?");
for (UUID id : items) {
statement.setString(1, id.toString());
@ -516,7 +517,7 @@ public class DataManager extends DataManagerAbstract {
}
statement.executeBatch();
connection.setAutoCommit(true);
}));
}