So, I know there are a few similarly named questions, but this is not the same.
I am curious to see if anyone could explain the reasoning for the lack of an increment
sentinel, similar to the delete
one.
As far as I know, a field deletion is no different than a document update. Meaning, I can just delete
my field by simply updating the entire document to some new data, leaving that field out, hence, the question.
If we have a FieldValue.delete()
, why the lack of a FieldValue.increment()
Note: I am aware of the 1QPS limit and I doubt it has anything to do with the above.
Regards!
Version 5.9.0 - Mar 14, 2019
Added FieldValue.increment(), which can be used in update() and set(..., {merge:true}) to increment or decrement numeric field values safely without transactions.
https://firebase.google.com/support/release-notes/js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With