Skip to content

Protobuf-backed Mutations #8040

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 6 commits into from
May 13, 2021

Conversation

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@var-const
Copy link
Contributor

Sorry I'm slow with the reviews -- I'm afraid I won't be able to get to these PRs until Wednesday. If this doesn't work for you, feel free to reassign.

Copy link
Contributor

@var-const var-const left a comment

Choose a reason for hiding this comment

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

Sorry about the long delay!

#include "absl/types/optional.h"

namespace firebase {
namespace firestore {
namespace model {

class MaybeDocument;
typedef std::map<FieldPath, absl::optional<google_firestore_v1_Value>>
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: does the map need to be sorted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does, as it is used as an input to SetAll. SetAll is more efficient it the input map is sorted as it processes field maps one layer at a time.

Copy link
Contributor

Choose a reason for hiding this comment

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

SetAll is more efficient it the input map is sorted as it processes field maps one layer at a time.

Can you add this part to the comment as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

#include "absl/types/optional.h"

namespace firebase {
namespace firestore {
namespace model {

class MaybeDocument;
typedef std::map<FieldPath, absl::optional<google_firestore_v1_Value>>
Copy link
Contributor

Choose a reason for hiding this comment

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

SetAll is more efficient it the input map is sorted as it processes field maps one layer at a time.

Can you add this part to the comment as well?

@schmidt-sebastian schmidt-sebastian merged commit 9e65580 into mrschmidt/mutabledocuments May 13, 2021
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/mutations branch May 13, 2021 15:36
@firebase firebase locked and limited conversation to collaborators Jun 13, 2021
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.

3 participants