Merge pull request #224 from Fuzzlemann/master

PR for 3.7.0 (or 3.6.2) (Fuzzlemann) (1)
This commit is contained in:
Rsl1122 2017-08-03 13:10:08 +03:00 committed by GitHub
commit 28d02408b7
3 changed files with 5 additions and 3 deletions

View File

@ -50,7 +50,9 @@ public class SQLiteDB extends SQLDB {
try {
Class.forName("org.sqlite.JDBC");
return DriverManager.getConnection("jdbc:sqlite:" + new File(plugin.getDataFolder(), dbName + ".db").getAbsolutePath());
Connection connection = DriverManager.getConnection("jdbc:sqlite:" + new File(plugin.getDataFolder(), dbName + ".db").getAbsolutePath());
connection.setAutoCommit(false);
return connection;
} catch (ClassNotFoundException | SQLException e) {
return null;
}

View File

@ -298,7 +298,7 @@ public class GMTimesTable extends Table {
List<List<Container<GMTimes>>> batches = DBUtils.splitIntoBatchesWithID(gmTimes);
batches.stream().forEach(batch -> {
batches.forEach(batch -> {
try {
addNewGMTimesBatch(batch);
} catch (SQLException e) {

View File

@ -218,7 +218,7 @@ public class SessionsTable extends Table {
List<List<Container<SessionData>>> batches = splitIntoBatches(sessions);
batches.stream().forEach(batch -> {
batches.forEach(batch -> {
try {
saveSessionBatch(batch);
} catch (SQLException e) {