Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void run(String apiUrl) throws Exception {
// relation
)),
new ClientWriteOptions()
.disableTransactions(true)
.transactions(false)
.authorizationModelId(authorizationModel.getAuthorizationModelId()))
.get();
System.out.println("Done Writing Tuples");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ internal class KotlinExample1 {
)
),
ClientWriteOptions()
.disableTransactions(true)
.transactions(false)
.authorizationModelId(authorizationModel.authorizationModelId)
)
.get()
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public CompletableFuture<ClientReadResponse> read(ClientReadRequest request, Cli
* <p>This method can operate in two modes depending on the options provided:</p>
*
* <h3>Transactional Mode (default)</h3>
* <p>When {@code options.disableTransactions()} is false or not set:</p>
* <p>Used by default, when no options are passed or when {@code transactions(true)} is set:</p>
* <ul>
* <li>All writes and deletes are executed as a single atomic transaction</li>
* <li>If any tuple fails, the entire operation fails and no changes are made</li>
Expand All @@ -421,7 +421,7 @@ public CompletableFuture<ClientReadResponse> read(ClientReadRequest request, Cli
* </ul>
*
* <h3>Non-Transactional Mode</h3>
* <p>When {@code options.disableTransactions()} is true:</p>
* <p>Used when {@code transactions(false)} is set on the options:</p>
* <ul>
* <li>Tuples are processed in chunks (size controlled by {@code transactionChunkSize})</li>
* <li>Each chunk is processed independently - some may succeed while others fail</li>
Expand Down Expand Up @@ -466,7 +466,7 @@ public CompletableFuture<ClientWriteResponse> write(ClientWriteRequest request)
* <p>This method can operate in two modes depending on the options provided:</p>
*
* <h3>Transactional Mode (default)</h3>
* <p>When {@code options.disableTransactions()} is false or not set:</p>
* <p>Used by default, when no options are passed or when {@code transactions(true)} is set:</p>
* <ul>
* <li>All writes and deletes are executed as a single atomic transaction</li>
* <li>If any tuple fails, the entire operation fails and no changes are made</li>
Expand All @@ -475,7 +475,7 @@ public CompletableFuture<ClientWriteResponse> write(ClientWriteRequest request)
* </ul>
*
* <h3>Non-Transactional Mode</h3>
* <p>When {@code options.disableTransactions()} is true:</p>
* <p>Used when {@code transactions(false)} is set on the options:</p>
* <ul>
* <li>Tuples are processed in chunks (size controlled by {@code transactionChunkSize})</li>
* <li>Each chunk is processed independently - some may succeed while others fail</li>
Expand Down Expand Up @@ -515,7 +515,7 @@ public CompletableFuture<ClientWriteResponse> write(ClientWriteRequest request,
configuration.assertValid();
String storeId = configuration.getStoreIdChecked();

if (options != null && options.disableTransactions()) {
if (options != null && !options.isTransactionsEnabled()) {
return writeNonTransaction(storeId, request, options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void run(String apiUrl) throws Exception {
// relation
)),
new ClientWriteOptions()
.disableTransactions(true)
.transactions(false)
.authorizationModelId(authorizationModel.getAuthorizationModelId()))
.get();
System.out.println("Done Writing Tuples");
Expand Down
Loading