mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-12 15:56:00 +08:00
Merge pull request #224 from Fuzzlemann/master
PR for 3.7.0 (or 3.6.2) (Fuzzlemann) (1)
This commit is contained in:
commit
28d02408b7
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user