Is the api Parse.Object.saveAll atomic?

Hello,

I just would like to save a list of the same class objects, seems I should use api Parse.Object.saveAll? is it faster than save each object one by one? and is it atomic? Thanks a lot.
https://parseplatform.org/Parse-SDK-JS/api/master/Parse.Object.html#.saveAll

It’s not atomic. If you need all or none behaviour I think you can do something custom in cloud code with the database driver. But you need to make sure your objects are parse compatible since your objects will not be checked by parse server. Otherwise you may face some unwanted results.

1 Like

For the JS SDK, saveAll can be atomic once the PR below is finished and merged:

2 Likes

Hi @cbaker6 ,

Just would like to know if this PR has been merged to the latest version 5, such as 5.4.0 ? Thanks a lot.

I wouldn’t know as I don’t use the JS SDK directly. You can do this easily on the Swift SDK by enabling transactions when configuring the SDK or on a per saveAll bases. I believe the Swift SDK is the only one that can use transactions currently. The other way would be to use the REST API directly, but that’s not the easiest to do when batching as constructing the command for this isn’t pretty.

1 Like