mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
add auto commit to the delete items bit
Took 43 seconds
This commit is contained in:
parent
e63fcccbf8
commit
40c1447372
@ -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);
|
||||
}));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user