
I need increase document attribute for my project and I found https://github.com/appwrite/appwrite/issues/3905 and https://github.com/utopia-php/database/pull/217 but I know increment/decrease API isn't available yet. Do you have any workaround?

Hi kurosh, yes this has been a highly requested feature, let me talk to my team and fix you up with any workarounds if possible

Also

It would be great if you could share a bit more about your usecase i.e. what you are trying to do so maybe we could discuss specific workarounds

I have this open source project https://github.com/mondora/cycletowork that I used firebase services for backend and I like to used appwrite

For example each cyclist has a some of km and CO2 and every time they biking we have to increase those values

that increase have to be atomic when there are in challenge and each company have some cyclist and we have to increase those values

Awesome, thank you for elaborating

So what you could do is as a workaround that

You could create a new data point and update the document https://appwrite.io/docs/client/databases?sdk=web-default#databasesUpdateDocument with the new data, they could use looping for this so instead of incrementing or decrementing it could be an update operation given that they are processing not more than 120 requests in every 1 minutes.

Maybe a function which does the updation for you and does all the calculation .

We do not have a fix currently for this but it would be great if you upvote the issue linked to incrementation and I’ll ask my team if there’s any timeline regarding this!

unfortunately this workaround is not work for me , I hope you implement this feature as soon as possible
Recommended threads
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
- REQUEST FAILED IN MIGRATION
I was trying to moved my archived project to a self-host database . Though the Project is "read only" but there's a message that I can view and migrate data to...
