Skip to content

Commit e959fe2

Browse files
Clarify behavior of executeWriteWithoutResult().
1 parent 7ec7c4f commit e959fe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver/src/main/java/org/neo4j/driver/Session.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ default <T> T executeWrite(TransactionCallback<T> callback) {
175175
* The driver will attempt committing the transaction when the provided unit of work completes successfully. Any exception emitted by the unit of work
176176
* will result in a rollback attempt.
177177
* <p>
178-
* The provided unit of work should not return {@link Result} object as it won't be valid outside the scope of the transaction.
178+
* This method works equivalently to {@link #executeWrite(TransactionCallback)}, but it allows for void returns.
179179
*
180180
* @param contextConsumer the consumer representing the unit of work.
181181
*/
@@ -223,7 +223,7 @@ default void executeWriteWithoutResult(Consumer<TransactionContext> contextConsu
223223
* The driver will attempt committing the transaction when the provided unit of work completes successfully. Any exception emitted by the unit of work
224224
* will result in a rollback attempt and abortion of execution unless exception is considered to be valid for retry attempt by the driver.
225225
* <p>
226-
* The provided unit of work should not return {@link Result} object as it won't be valid outside the scope of the transaction.
226+
* This method works equivalently to {@link #executeWrite(TransactionCallback, TransactionConfig)}, but it allows for void returns.
227227
*
228228
* @param contextConsumer the consumer representing the unit of work.
229229
* @param config the transaction configuration for the managed transaction.

0 commit comments

Comments
 (0)