Reputation: 13
What is the most efficient way to do bulk updates in Realm using React Native?
For example, I want to query for some records in a particular Realm object that satisfy a particular filter, and then update a property on each record returned from the query.
I've seen several Swift and Java examples here on SO, but I believe the method chaining used there is not available for React Native, though I may be mistaken.
Upvotes: 1
Views: 1766
Reputation: 1447
As long as you are updating all of your objects in a single write transaction it should be pretty quick to loop through and update each object. There is currently no optimized batch update operation.
Upvotes: 2