Skip to content
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: use update_transform when possible #949

Merged
merged 8 commits into from
Mar 9, 2020

Conversation

thebrianchen
Copy link

No description provided.

@thebrianchen thebrianchen self-assigned this Mar 3, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 3, 2020
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/document.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/system-test/firestore.ts Outdated Show resolved Hide resolved
dev/system-test/firestore.ts Outdated Show resolved Hide resolved
dev/test/util/helpers.ts Show resolved Hide resolved
dev/test/util/helpers.ts Outdated Show resolved Hide resolved
dev/test/util/helpers.ts Outdated Show resolved Hide resolved
Copy link
Author

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

did another pass with your comments, thanks!

dev/src/document.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/test/util/helpers.ts Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
fieldTransforms,
},
};
return fieldTransforms;
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: Use map to turn this function into one line.

Copy link
Author

Choose a reason for hiding this comment

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

attempted, but used Array.from()

dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/system-test/firestore.ts Show resolved Hide resolved
@@ -913,6 +913,8 @@ describe('set document', () => {
requestEquals(
request,
set({
document: document('documentId'),
mask: updateMask(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will break the conformance tests. We should also not set an empty update mask.

Copy link
Author

Choose a reason for hiding this comment

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

removed here and in other unit tests that used an empty update mask

dev/test/util/helpers.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Can you create a "bulk writer" branch to merge this into? Otherwise, we have to wait for this to be in Prod.

dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/src/write-batch.ts Outdated Show resolved Hide resolved
dev/test/util/helpers.ts Outdated Show resolved Hide resolved
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.

3 participants