From 43f8a65b989bcdaac45c9df2a6a89cccdea7d014 Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Mon, 29 Jan 2024 16:15:32 +0100 Subject: [PATCH] Clarify behavior of `executeWriteWithoutResult()`. (#1524) * Clarify behavior of `executeWriteWithoutResult()`. * Update driver/src/main/java/org/neo4j/driver/Session.java * Update driver/src/main/java/org/neo4j/driver/Session.java --------- Co-authored-by: Dmitriy Tverdiakov <11927660+injectives@users.noreply.github.com> --- driver/src/main/java/org/neo4j/driver/Session.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/src/main/java/org/neo4j/driver/Session.java b/driver/src/main/java/org/neo4j/driver/Session.java index 41eee27751..b1db6f652d 100644 --- a/driver/src/main/java/org/neo4j/driver/Session.java +++ b/driver/src/main/java/org/neo4j/driver/Session.java @@ -175,7 +175,7 @@ default T executeWrite(TransactionCallback callback) { * The driver will attempt committing the transaction when the provided unit of work completes successfully. Any exception emitted by the unit of work * will result in a rollback attempt. *

- * The provided unit of work should not return {@link Result} object as it won't be valid outside the scope of the transaction. + * This method works equivalently to {@link #executeWrite(TransactionCallback)}, but does not have a return value. * * @param contextConsumer the consumer representing the unit of work. */ @@ -223,7 +223,7 @@ default void executeWriteWithoutResult(Consumer contextConsu * The driver will attempt committing the transaction when the provided unit of work completes successfully. Any exception emitted by the unit of work * will result in a rollback attempt and abortion of execution unless exception is considered to be valid for retry attempt by the driver. *

- * The provided unit of work should not return {@link Result} object as it won't be valid outside the scope of the transaction. + * This method works equivalently to {@link #executeWrite(TransactionCallback, TransactionConfig)}, but does not have a return value. * * @param contextConsumer the consumer representing the unit of work. * @param config the transaction configuration for the managed transaction.