Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

feat: add support for fieldmask to document reference#245

Merged
BenWhitehead merged 3 commits into
googleapis:masterfrom
suraj-qlogic:firestore-227
Jun 15, 2020
Merged

feat: add support for fieldmask to document reference#245
BenWhitehead merged 3 commits into
googleapis:masterfrom
suraj-qlogic:firestore-227

Conversation

@suraj-qlogic

Copy link
Copy Markdown
Contributor

Fixes #227

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 9, 2020
@suraj-qlogic suraj-qlogic changed the title Add support for FieldMask to DocumentReference add support for fieldmask to document reference Jun 9, 2020
@codecov

codecov Bot commented Jun 9, 2020

Copy link
Copy Markdown

Codecov Report

Merging #245 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #245      +/-   ##
============================================
+ Coverage     72.92%   73.01%   +0.08%     
- Complexity     1024     1025       +1     
============================================
  Files            64       64              
  Lines          5430     5444      +14     
  Branches        614      620       +6     
============================================
+ Hits           3960     3975      +15     
- Misses         1270     1271       +1     
+ Partials        200      198       -2     
Impacted Files Coverage Δ Complexity Δ
.../com/google/cloud/firestore/DocumentReference.java 73.56% <100.00%> (+0.30%) 32.00 <1.00> (+1.00)
...restore/collection/ImmutableSortedMapIterator.java 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)
...rc/main/java/com/google/cloud/firestore/Watch.java 91.66% <0.00%> (+0.11%) 56.00% <0.00%> (ø%)
...rc/main/java/com/google/cloud/firestore/Query.java 90.96% <0.00%> (+0.16%) 105.00% <0.00%> (ø%)
...a/com/google/cloud/firestore/FirestoreOptions.java 36.97% <0.00%> (+0.53%) 7.00% <0.00%> (ø%)
...oogle/cloud/firestore/v1/FirestoreAdminClient.java 59.84% <0.00%> (+1.57%) 38.00% <0.00%> (ø%)

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 b5749d4...042cf9a. Read the comment docs.

@suraj-qlogic suraj-qlogic changed the title add support for fieldmask to document reference feat: add support for fieldmask to document reference Jun 9, 2020
@suraj-qlogic suraj-qlogic requested a review from BenWhitehead June 9, 2020 11:22

@BenWhitehead BenWhitehead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @suraj-qlogic. One small request for the integration test.

DocumentReference ref = randomColl.document("doc1");
ref.set(ALL_SUPPORTED_TYPES_MAP).get();
DocumentSnapshot documentSnapshots = ref.get(FieldMask.of("foo")).get();
assertEquals("bar", documentSnapshots.get("foo"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an assertion for the absence of one of the fields that should not be returned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@BenWhitehead BenWhitehead merged commit 4a846b1 into googleapis:master Jun 15, 2020
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for FieldMask to DocumentReference.get()

3 participants