-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Adding FieldValue.increment() #444
Conversation
f522079
to
14f3e69
Compare
types/firestore.d.ts
Outdated
* that tells the server to add the given value to the field's current | ||
* value. | ||
* | ||
* If the either current field value or the operand uses floating point |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
dev/system-test/firestore.ts
Outdated
@@ -287,6 +287,20 @@ describe('DocumentReference class', () => { | |||
}); | |||
}); | |||
|
|||
it('supports numericAdd()', () => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
FYI: Pushed commit to rename |
4b7b3de
to
ee79e97
Compare
PR updated to use increment() name in Proto. |
Codecov Report
@@ Coverage Diff @@
## master #444 +/- ##
=========================================
+ Coverage 95.77% 95.98% +0.2%
=========================================
Files 24 24
Lines 1943 1943
Branches 168 169 +1
=========================================
+ Hits 1861 1865 +4
+ Misses 59 57 -2
+ Partials 23 21 -2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #444 +/- ##
=========================================
+ Coverage 95.77% 95.9% +0.12%
=========================================
Files 24 24
Lines 1943 1955 +12
Branches 168 169 +1
=========================================
+ Hits 1861 1875 +14
Misses 59 59
+ Partials 23 21 -2
Continue to review full report at Codecov.
|
This adds support for the new NUMERIC_ADD Field Transform.
There is a lot of error message cleanup in this PR to make the error message for specifying an invalid NumericAdd operand make sense.
DO NOT MERGE until backend support is available (at which point the system test should pass).