-
Notifications
You must be signed in to change notification settings - Fork 50
feat: expose reserveIds API #56
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
feat: expose reserveIds API #56
Conversation
Codecov Report
@@ Coverage Diff @@
## master #56 +/- ##
===========================================
- Coverage 59.44% 59.25% -0.2%
+ Complexity 384 378 -6
===========================================
Files 46 46
Lines 2286 2280 -6
Branches 251 250 -1
===========================================
- Hits 1359 1351 -8
- Misses 820 822 +2
Partials 107 107
Continue to review full report at Codecov.
|
|
@BenWhitehead PTAL |
google-cloud-datastore/src/main/java/com/google/cloud/datastore/Datastore.java
Outdated
Show resolved
Hide resolved
| ReserveIdsRequest.Builder requestPb = ReserveIdsRequest.newBuilder(); | ||
| for (Key key : keys) { | ||
| if (key instanceof Key) { | ||
| key = (Key) IncompleteKey.fromPb(key.toPb()); |
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.
Why do we need the instanceof check and Key -> pb -> IncompleteKey -> Key dance here?
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 pointing out this, it's look like unused, I have already simplified this.
google-cloud-datastore/src/main/java/com/google/cloud/datastore/Datastore.java
Outdated
Show resolved
Hide resolved
|
@BenWhitehead all the comment has been addressed. PTAL |
google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreImpl.java
Outdated
Show resolved
Hide resolved
|
One small change, after that this will be ready to merge. |
|
Thanks for the feature @athakor! |
Fixes #53
Proposed Design Doc.
~/cc: @BenWhitehead