From cdec3f2f91e0524d5bd21fd0c389e5301cc1fe8f Mon Sep 17 00:00:00 2001
From: Snabeldier <79211348+Snabeldier@users.noreply.github.com>
Date: Thu, 2 Jan 2025 06:54:43 +0100
Subject: [PATCH] add some information about throws exeptions when asking for
generated keys where no were supposed to be returned
---
.../java/minevalley/core/api/database/StatementBuilder.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/minevalley/core/api/database/StatementBuilder.java b/src/main/java/minevalley/core/api/database/StatementBuilder.java
index 02ea1c4..5518ee1 100644
--- a/src/main/java/minevalley/core/api/database/StatementBuilder.java
+++ b/src/main/java/minevalley/core/api/database/StatementBuilder.java
@@ -350,7 +350,7 @@ public interface StatementBuilder extends AutoCloseable {
* Note: This method should be used for queries that do not return a result set.
*
* @return the generated key
- * @throws IllegalStateException if this method is called on a closed {@code StatementBuilder}
+ * @throws IllegalStateException if this method is called on a closed {@code StatementBuilder} or this statement builder is not supposed to retrieve generated keys
* @throws SQLException if a database access error occurs
*/
@Contract(pure = true)
@@ -362,7 +362,7 @@ public interface StatementBuilder extends AutoCloseable {
* Note: This method should be used for queries that do not return a result set.
*
* @return a {@link CompletableFuture} that will be completed once the query has been executed and the key has been retrieved
- * @throws IllegalStateException if this method is called on a closed {@code StatementBuilder}
+ * @throws IllegalStateException if this method is called on a closed {@code StatementBuilder} or this statement builder is not supposed to retrieve generated keys
*/
@Nonnull
@Contract(pure = true)