Skip to content

Backport Protobuf changes #75

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 2 commits into from
Oct 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ message NoDocument {
google.protobuf.Timestamp read_time = 2;
}

// A message indicating that the document that is known to exist but its data is unknown.
// A message indicating that the document that is known to exist but its data
// is unknown.
message UnknownDocument {
// The name of the document that is known to exist, in the standard format:
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`
Expand All @@ -44,8 +45,9 @@ message UnknownDocument {
google.protobuf.Timestamp version = 2;
}

// Represents either an existing document, the explicitly known absence of a document, or a document
// that is known to exist (at some version) but whose contents are unknown
// Represents either an existing document, the explicitly known absence of a
// document, or a document that is known to exist (at some version) but whose
// contents are unknown.
message MaybeDocument {
oneof document_type {
// Used if the document is known to not exist.
Expand All @@ -54,12 +56,13 @@ message MaybeDocument {
// The document (if it exists).
google.firestore.v1beta1.Document document = 2;

// Used if the document is known to exist but its data is unknown
// Used if the document is known to exist but its data is unknown.
UnknownDocument unknown_document = 3;
}

// `hasCommittedMutations` marks documents that were written to the remote socument store based
// on a write acknowledgment. These documents are potentially inconsistent with the backend's
// copy and use the write's commit version as their document version.
bool hasCommittedMutations = 4;
// `hasCommittedMutations` marks documents that were written to the remote
Copy link
Member

Choose a reason for hiding this comment

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

nit: Similar to the other pr, consider fixing the name in the comment too.

// document store based on a write acknowledgment. These documents are
// potentially inconsistent with the backend's copy and use the write's
// commit version as their document version.
bool has_committed_mutations = 4;
}