mysql-crash #11

Merged
JaTiTV merged 2 commits from mysql-crash into main 2022-06-02 10:29:18 +00:00
2 changed files with 3 additions and 12 deletions
Showing only changes of commit ebbec1f660 - Show all commits

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.7.5</version>
<version>2.7.6_DEV</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -54,6 +54,7 @@ public class MySQL {
send.debugmsg(Main.plugin, "§6Driver: §e" + dbmd.getDriverName());
send.debugmsg(Main.plugin, "§6Driver MajorVersion: §e" + dbmd.getDriverMajorVersion() + "." + dbmd.getDriverMinorVersion());
send.debugmsg(Main.plugin, "§6Driver Version: §e" + dbmd.getDriverVersion());
con.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
@ -73,17 +74,7 @@ public class MySQL {
Statement stmt = con.createStatement();
stmt.execute(query);
stmt.close();
}
public static void query(ArrayList<String> queryList) throws SQLException {
Connection con = ds.getConnection();
Statement stmt = con.createStatement();
for (String query : queryList) {
send.debug(Main.plugin, query);
stmt.addBatch(query);
}
stmt.executeBatch();
stmt.close();
con.close();
}