Skip to content

Conversation

@athakor
Copy link
Contributor

@athakor athakor commented Feb 26, 2020

Fixes #53

Proposed Design Doc.

~/cc: @BenWhitehead

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 26, 2020
@athakor athakor requested a review from BenWhitehead February 26, 2020 12:56
@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #56 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
...java/com/google/cloud/datastore/DatastoreImpl.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...oogle/cloud/datastore/spi/v1/HttpDatastoreRpc.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...n/java/com/google/cloud/datastore/PathElement.java 79.06% <0%> (-0.48%) 23% <0%> (-3%)
.../src/main/java/com/google/cloud/datastore/Key.java 79.1% <0%> (-0.31%) 16% <0%> (ø)
...java/com/google/cloud/datastore/IncompleteKey.java 87.8% <0%> (-0.3%) 9% <0%> (ø)
.../main/java/com/google/cloud/datastore/BaseKey.java 89.39% <0%> (-0.16%) 14% <0%> (ø)
...va/com/google/cloud/datastore/StructuredQuery.java 71.38% <0%> (-0.08%) 23% <0%> (ø)
...a/com/google/cloud/datastore/QueryResultsImpl.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
...in/java/com/google/cloud/datastore/KeyFactory.java 100% <0%> (ø) 7% <0%> (-3%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2096777...be9dc01. Read the comment docs.

@athakor
Copy link
Contributor Author

athakor commented Feb 27, 2020

@BenWhitehead PTAL

ReserveIdsRequest.Builder requestPb = ReserveIdsRequest.newBuilder();
for (Key key : keys) {
if (key instanceof Key) {
key = (Key) IncompleteKey.fromPb(key.toPb());
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@athakor
Copy link
Contributor Author

athakor commented Feb 28, 2020

@BenWhitehead all the comment has been addressed. PTAL

@BenWhitehead
Copy link
Collaborator

One small change, after that this will be ready to merge.

@athakor athakor marked this pull request as ready for review March 2, 2020 09:50
@BenWhitehead
Copy link
Collaborator

Thanks for the feature @athakor!

@BenWhitehead BenWhitehead merged commit c7f795b into googleapis:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Datastore] expose 'reserveIds' API

3 participants