From 5c19dd8b1506455177f047053e3663cf77e51da5 Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 30 Aug 2016 22:38:08 +0100 Subject: [PATCH] .-. --- .../java/me/lucko/luckperms/storage/methods/H2Datastore.java | 2 +- .../java/me/lucko/luckperms/storage/methods/MySQLDatastore.java | 2 +- .../me/lucko/luckperms/storage/methods/SQLiteDatastore.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java index 247888dc..c57432fd 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java @@ -66,6 +66,7 @@ public class H2Datastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -84,7 +85,6 @@ public class H2Datastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet); diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java index 42f67a56..7bff3f91 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java @@ -85,6 +85,7 @@ public class MySQLDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -103,7 +104,6 @@ public class MySQLDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet); diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java index f3f543ff..964d12af 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java @@ -66,6 +66,7 @@ public class SQLiteDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -84,7 +85,6 @@ public class SQLiteDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet);