Open nicop2000 opened 2 years ago
The idea is to delete and save again, but the delete is bugged, will create a pull request next week I guess
There really should be an upsert operation.
@mattrltrent Is just a delete followed by an add
@ivofernandes This isn't atomic though? Let's say you want to guarantee your existing key is either updated or left alone. With this current implementation, that seems impossible. This is because the delete could succeed, but saving a new value could fail.
I guess for that you need to dive into iOS cloudkit documentation and see if there are other methods besides what this package is using?
Yup, there seems to be a decided update method as documented here: https://developer.apple.com/documentation/cloudkitjs/cloudkit/recordsbatchbuilder/1628739-update
How to update an entry?