Skip to content

decrement operation #86

Answered by cbaker6
vdkdamian asked this question in Q&A
Mar 26, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

ParseSwift only supports what the server supports. If you would like to see additional operations supported on the server, I recommend you open up related issues there. Supported operations on the server are here: https://github.com/parse-community/parse-server/blob/65e5879e42cefb4b462c9383af3705d027131242/src/Controllers/DatabaseController.js#L274-L309 and https://github.com/parse-community/parse-server/blob/65e5879e42cefb4b462c9383af3705d027131242/src/Controllers/SchemaController.js#L1600-L1620

Decrement can be easily achieved by incrementing by a negative number:

let incrementOperation = savedScore.operation.increment("points", by: -1)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vdkdamian
Comment options

Answer selected by cbaker6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants