I want to add 100 entities (then update and delete them) to the datastore, but I don't know how to do that in a low level api. I did it in JDO. The documentation for low level is very scarce.
How to do a batch write, update and delete entities in low-level api datastore?
2.1k Views Asked by user1607512 At
2
There are 2 best solutions below
0
On
The documentation is here: Batch Operations.
I suggest you to take a look at the async datastore api as well to improve even more the performance of your application.
You can pass a collection of entities to put method - this will batch create/update the entities:
datastoreService.put(Iterable<Entity>)(collection of Entities).You can also batch delete:
datastoreService.delete(Iterable<Key> collection)(collection of Keys) ordatastoreService.delete(Key.. keys)(array of Keys)