We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eb5fb7 commit 01a6cedCopy full SHA for 01a6ced
website/docs/clients/migration-guides/index.mdx
@@ -293,14 +293,11 @@ BatchWriteParams batchParams = new BatchWriteParams();
293
List<BatchOperation> requests = new ArrayList<>();
294
295
for (Map<String, Object> record : records) {
296
- BatchOperation request = new BatchOperation();
297
- Map<String, String> body = new HashMap<>();
298
-
299
- request.setAction("addObject");
300
- // Accepts a free form `Map<String, Object>`.
301
- request.setBody(record);
302
303
- requests.add(request);
+ requests.add(new BatchOperation()
+ .setAction(Action.ADD_OBJECT)
+ // Accepts a free form `Map<String, Object>`.
+ .setBody(record)
+ );
304
}
305
306
batchParams.setRequests(requests);
0 commit comments