Skip to content

Add setDoc, updateDoc, deleteDoc and addDoc #3306

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

Merged
merged 10 commits into from
Jun 27, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

While this is a large PR, this is mostly a copy of code from the Lite SDK, but instead of Datastore it uses FirestoreClient to commit the write (which adds it to LocalStore first).

@changeset-bot
Copy link

changeset-bot bot commented Jun 26, 2020

🦋 Changeset is good to go

Latest commit: f72c161

We got this.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 26, 2020

Binary Size Report

Affected SDKs

No changes between base commit (5d6b749) and head commit (e0c9b65).

Test Logs


return firestore
._getFirestoreClient()
.then(firestoreClient =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment from previous PR's. Why is there chaining instead of just using async/await?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same response: )

"The outermost code needs to be async to ensure synchronous function execution, which impacts error propagation and execution order. The cast calls here, for example, would not throw but cause rejected Promises."

In this case, this also impact user input validation, which we want to throw as it is likely caused by invalid SDK usage.

@schmidt-sebastian schmidt-sebastian changed the base branch from mrschmidt/getdoc-exp to master June 27, 2020 03:26
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to determine that you authored the commits in this PR. Maybe you used a different email address in the git commits than was used to sign the CLA? If someone else authored these commits, then please add them to this pull request and have them confirm that they're okay with them being contributed to Google. If there are co-authors, make sure they're formatted properly.

In order to pass this check, please resolve this problem and then comment@googlebot I fixed it... If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@schmidt-sebastian schmidt-sebastian merged commit 5f51ab5 into master Jun 27, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/setdoc-exp branch June 27, 2020 05:13
@firebase firebase locked and limited conversation to collaborators Jul 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants