Skip to content

Commit 0b6ac70

Browse files
Adding UnknownDocument
1 parent 9feb291 commit 0b6ac70

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

Firestore/Protos/protos/firestore/local/maybe_document.proto

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,20 @@ message NoDocument {
2020
google.protobuf.Timestamp read_time = 2;
2121
}
2222

23-
// Represents either an existing document, the explicitly known absence of a document, or a document
24-
// that is known to exist (at some version) but whose contents are unknown
23+
// A message indicating that the document that is known to exist but its data
24+
// is unknown.
25+
message UnknownDocument {
26+
// The name of the document that is known to exist, in the standard format:
27+
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`
28+
string name = 1;
29+
30+
// The version at which we know the document exists.
31+
google.protobuf.Timestamp version = 2;
32+
}
33+
34+
// Represents either an existing document, the explicitly known absence of a
35+
// document, or a document that is known to exist (at some version) but whose
36+
// contents are unknown.
2537
message MaybeDocument {
2638
oneof document_type {
2739
// Used if the document is known to not exist.
@@ -30,12 +42,13 @@ message MaybeDocument {
3042
// The document (if it exists).
3143
google.firestore.v1beta1.Document document = 2;
3244

33-
// Used if the document is known to exist but its data is unknown
45+
// Used if the document is known to exist but its data is unknown.
3446
UnknownDocument unknown_document = 3;
3547
}
3648

37-
// `hasCommittedMutations` marks documents that were written to the remote socument store based
38-
// on a write acknowledgment. These documents are potentially inconsistent with the backend's
39-
// copy and use the write's commit version as their document version.
40-
bool hasCommittedMutations = 4;
49+
// `hasCommittedMutations` marks documents that were written to the remote
50+
// document store based on a write acknowledgment. These documents are
51+
// potentially inconsistent with the backend's copy and use the write's
52+
// commit version as their document version.
53+
bool has_committed_mutations = 4;
4154
}

0 commit comments

Comments
 (0)