Skip to content

Add update_transform protos #4118

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 3 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions packages/firestore/src/protos/firestore_proto_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
verify?: string;
transform?: DocumentTransform;
updateMask?: DocumentMask;
updateTransforms?: FieldTransform[];
currentDocument?: Precondition;
}
interface WriteRequest {
Expand Down
12 changes: 8 additions & 4 deletions packages/firestore/src/protos/google/firestore/v1/write.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ message Write {
// This only requires read access to the document.
string verify = 5;

// Applies a tranformation to a document.
// At most one `transform` per document is allowed in a given request.
// An `update` cannot follow a `transform` on the same document in a given
// request.
// Applies a transformation to a document.
DocumentTransform transform = 6;
}

Expand All @@ -66,6 +63,13 @@ message Write {
// The field paths in this mask must not contain a reserved field name.
DocumentMask update_mask = 3;

// The transforms to perform after update.
//
// This field can be set only when the operation is `update`. If present, this
// write is equivalent to performing `update` and `transform` to the same
// document atomically and in order.
repeated DocumentTransform.FieldTransform update_transforms = 7;

// An optional precondition on the document.
//
// The write will fail if this is set and not met by the target document.
Expand Down