Closed onhate closed 3 years ago
codecov decreased because lines of code reduced too.
@SamVerschueren what do you think about this feature?
@SamVerschueren ?
Hi @onhate. Sorry about the delay.
I noticed the following comment in the docs though.
Not sure why, it's not really explained. The change for using ADD
should behave exactly the same as what we had with SET
, right? The only benefit is that we don't have to generate the _v_empty_value
?
🤔 that's weird, I think they meant that because ADD can have different behaviors if using it with sets or numbers which could cause confusion, like trying to create a set with a number and instead it creates a number field, but on our case we have clear operations for sets($addToSet, $removeFromSet) and numbers ($inc) that will enforce the creation of a set or a numeric value.
Correct, the main benefit is to remove the extra overhead of checking if exists or not and the _empty_value.
Expressions.UpdateExpressions.ADD