mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-22 18:09:06 +00:00
Re-enable autocommit
This commit is contained in:
parent
d7858a791a
commit
5a5c139ea6
@ -22,7 +22,6 @@ public abstract class Database {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try {
|
||||
final Connection conn = dataSource.getConnection();
|
||||
conn.setAutoCommit(false);
|
||||
final PreparedStatement statement = conn.prepareStatement(
|
||||
"INSERT INTO VentureChat " +
|
||||
"(ChatTime, UUID, Name, Server, Channel, Text, Type) " +
|
||||
@ -35,7 +34,6 @@ public abstract class Database {
|
||||
statement.setString(6, text);
|
||||
statement.setString(7, type);
|
||||
statement.executeUpdate();
|
||||
conn.commit();
|
||||
} catch(SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public class MySQL extends Database {
|
||||
dataSource = new HikariDataSource(config);
|
||||
try {
|
||||
Connection conn = dataSource.getConnection();
|
||||
conn.setAutoCommit(false);
|
||||
Statement statement = conn.createStatement();
|
||||
statement.executeUpdate("CREATE TABLE IF NOT EXISTS VentureChat " +
|
||||
"(ID SERIAL PRIMARY KEY, ChatTime TEXT, UUID TEXT, Name TEXT, " +
|
||||
|
Loading…
x
Reference in New Issue
Block a user