diff --git a/src/main/java/minevalley/core/api/Core.java b/src/main/java/minevalley/core/api/Core.java index 941ec72..a1fe29d 100644 --- a/src/main/java/minevalley/core/api/Core.java +++ b/src/main/java/minevalley/core/api/Core.java @@ -178,7 +178,12 @@ public static BukkitTask runAsyncTaskPeriodically(long delay, long period, @Nonn @Nonnull public static StatementBuilder prepareSQL(@Nonnull @Language("SQL") String sql) { - return server.prepareSQL(sql); + return server.prepareSQL(sql, false); + } + + @Nonnull + public static StatementBuilder prepareSQL(@Nonnull @Language("SQL") String sql, boolean retrieveGeneratedKeys) { + return server.prepareSQL(sql, retrieveGeneratedKeys); } /** diff --git a/src/main/java/minevalley/core/api/CoreServer.java b/src/main/java/minevalley/core/api/CoreServer.java index 51ce38e..96468f7 100644 --- a/src/main/java/minevalley/core/api/CoreServer.java +++ b/src/main/java/minevalley/core/api/CoreServer.java @@ -83,7 +83,7 @@ public interface CoreServer { BukkitTask runAsyncTaskPeriodically(long delay, long period, @Nonnull Runnable runnable) throws IllegalArgumentException; @Nonnull - StatementBuilder prepareSQL(@Nonnull @Language("SQL") String sql); + StatementBuilder prepareSQL(@Nonnull @Language("SQL") String sql, boolean retrieveGeneratedKeys); void registerListener(@Nonnull Class cls, @Nonnull EventListener listener) throws IllegalArgumentException; diff --git a/src/main/java/minevalley/core/api/database/StatementBuilder.java b/src/main/java/minevalley/core/api/database/StatementBuilder.java index 6eaac5f..01fbffa 100644 --- a/src/main/java/minevalley/core/api/database/StatementBuilder.java +++ b/src/main/java/minevalley/core/api/database/StatementBuilder.java @@ -8,7 +8,7 @@ import java.sql.*; import java.util.concurrent.CompletableFuture; -/** + /** * This interface covers some but not nearly all features of the {@link PreparedStatement} interface as provided by the JDBC API. * It's designed to provide some improvements such as an asynchronous execution and a builder pattern for setting parameters to reduce boilerplate code. * Such as the {@link PreparedStatement} interface, the results of the query can be retrieved using the {@link ResultSet} interface.