
Completly possible in mysql π


as far as i know, you will have to fetch the document in order to read the values in it. There's no way for your app to know what to update in your document without fetching it first.

Ah yes it works in vanilla SQL, but I don't think appwrite has that functionality yet. Let me check just to be sure

Okay so this might do what you want. Not a 100% sure as I haven't tested it myself.
Update Document in the Server SDK: https://appwrite.io/docs/server/databases?sdk=nodejs-default#databasesUpdateDocument
According to the docs, you can pass something in the data
param.

const promise = databases.updateDocument('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {'logins': 'logins+1'});
Maybe something like this?

Please test and let me know if it works!

I have a function right here π

I can test it

{"code":400,"type":"document_invalid_structure","response":{"message":"Invalid document structure: Attribute \"CurrentStation\" has invalid format. Value must be a valid range between 1 and 99","code":400,"type":"document_invalid_structure","version":"1"}}

Can you share your code snippet?

I think I know what the issue is, just want to be sure.

Pretty funny btw if you do this

it just turns the value to 69

ignoring the +


Ah yes. In the example I provided pseudo-code.
'CurrentStation+1'
needs to hold some sort of operation

The CurrentStation
attribute in your collection is of type integer right? Well in this code you're passing a string. Which is why you're getting the above error.

Now that I think about it, it might not be possible to directly update it

<a:rollsad:826037118953586699>

@Steven You are good in this stuff π Do you have an idea?

not possible π

here's the related feature request: https://github.com/appwrite/appwrite/issues/3905

Oh ok I didnt find it

Recommended threads
- 2 Columns still processing since yesterd...
Hey o/ Yesterday (around <t:1758045600:f>), I created a database and added several columns to it. After about 15 minutes, most of the "processing" tags disappe...
- 503 Timeout when Updating or Upserting D...
Hey Iβm running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Row with the requested ID already exists...
Iβm hitting a blocking issue creating rows in Appwrite (both from the console and my React Native app). After successfully inserting the first row, every subseq...
