SoberOriginal post
Rank 1: Thread
I've set up my own SDK accessed as below
Plain text
DB["userinfo"]["bankaccounts"]:update({ method = "equal", attribute = "userid", values = { 1 } }, function(res) print(res) for i,v in pairs(res) do print(v.balance) v.balance = v.balance + 1 end return res end)```
I'm concerned with how on the backend I'll update the appended changesI see I have two options after determining which values have been changed.1. `PATCH /databases/{databaseId}/collections/{collectionId}/documents/{documentId}`Update each document individually which I'm worried if scaled will affect the rate limit (not only by appwrite but outgoing http limitations)
2. `PATCH /databases/{databaseId}/collections/{collectionId}/documents`Second case seems more preferable as its all done in one request, however from my knowledge there isn't any way I can accomplish as done in the example, comparing previous data.
Is there a way that I can make method 2 work or do I have to work with method 1?Summary
Developers want to update multiple documents at once based on OG value. They are considering individual updates or bulk updates using API requests. Solution: Stick with method 1 to avoid rate limits while updating each document individually.