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 { try {
Class.forName("org.sqlite.JDBC"); 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) { } catch (ClassNotFoundException | SQLException e) {
return null; return null;
} }

View File

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

View File

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