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
Using the new Timestamp class in the public API #226
Conversation
5649097
to
ce4f02f
Compare
Codecov Report
@@ Coverage Diff @@
## master #226 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 13 13
Lines 1834 1837 +3
=====================================
+ Hits 1834 1837 +3
Continue to review full report at Codecov.
|
ce4f02f
to
564bc37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nitpicks. It's been a while since I touched JSDoc, so my comments might be inapplicable.
* @param {Timestamp} readTime - The time when this snapshot was read. | ||
* @param {Timestamp=} createTime - The time when the document was created | ||
* (or undefined if the document does not exist). | ||
* @param {Timestamp=} updateTime - The time when the document was last | ||
* updated (or undefined if the document does not exist). |
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.
* @param {string=} updateTime - The ISO 8601 time when the document was last | ||
* @param {Timestamp} readTime - The time when this snapshot was read. | ||
* @param {Timestamp=} createTime - The time when the document was created | ||
* (or undefined if the document does not exist). |
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.
src/reference.js
Outdated
* document was last updated at lastUpdateTime (as ISO 8601 string). Fails the | ||
* delete if the document was last updated at a different time. | ||
* @param {Timestamp=} precondition.lastUpdateTime If set, enforces that the | ||
* document was last updated at lastUpdateTime. Fails the elete if the |
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.
src/reference.js
Outdated
* delete if the document was last updated at a different time. | ||
* @param {Timestamp=} precondition.lastUpdateTime If set, enforces that the | ||
* document was last updated at lastUpdateTime. Fails the elete if the | ||
* ddocument was last updated at a different time. |
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.
*/ | ||
static fromProto(timestamp) { | ||
return new Timestamp( | ||
Number(timestamp.seconds || 0), |
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.
@@ -40,11 +40,16 @@ let DocumentMask; | |||
*/ | |||
let DocumentTransform; | |||
|
|||
/* | |||
/*! |
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.
* @param {string=} createTime - The ISO 8601 time when the document was | ||
* created (or undefined if the document does not exist). | ||
* @param {string=} updateTime - The ISO 8601 time when the document was last | ||
* @param {Timestamp} readTime - The time when this snapshot was read. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. Sorry for pushing back on most of your feedback with the lamest response in software engineering (that I want to match the rest of the docs).
* @param {string=} createTime - The ISO 8601 time when the document was | ||
* created (or undefined if the document does not exist). | ||
* @param {string=} updateTime - The ISO 8601 time when the document was last | ||
* @param {Timestamp} readTime - The time when this snapshot was read. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* @param {string=} updateTime - The ISO 8601 time when the document was last | ||
* @param {Timestamp} readTime - The time when this snapshot was read. | ||
* @param {Timestamp=} createTime - The time when the document was created | ||
* (or undefined if the document does not exist). |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* @param {Timestamp} readTime - The time when this snapshot was read. | ||
* @param {Timestamp=} createTime - The time when the document was created | ||
* (or undefined if the document does not exist). | ||
* @param {Timestamp=} updateTime - The time when the document was last | ||
* updated (or undefined if the document does not exist). |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/reference.js
Outdated
* delete if the document was last updated at a different time. | ||
* @param {Timestamp=} precondition.lastUpdateTime If set, enforces that the | ||
* document was last updated at lastUpdateTime. Fails the elete if the | ||
* ddocument was last updated at a different time. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/reference.js
Outdated
* document was last updated at lastUpdateTime (as ISO 8601 string). Fails the | ||
* delete if the document was last updated at a different time. | ||
* @param {Timestamp=} precondition.lastUpdateTime If set, enforces that the | ||
* document was last updated at lastUpdateTime. Fails the elete if the |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
*/ | ||
static fromProto(timestamp) { | ||
return new Timestamp( | ||
Number(timestamp.seconds || 0), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -40,11 +40,16 @@ let DocumentMask; | |||
*/ | |||
let DocumentTransform; | |||
|
|||
/* | |||
/*! |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
969097c
to
a6660d9
Compare
812dd25
to
2c1dba8
Compare
This is a breaking API change that uses the new Timestamp type instead of ISO Strings in all places where we need nanosecond precision.