| { |
| "tests": [ |
| { |
| "description": "update: ArrayUnion alone", |
| "comment": "If the only values in the input are ArrayUnion, then no\nupdate operation should be produced.", |
| "update": { |
| "docRefPath": "projects/projectID/databases/(default)/documents/C/d", |
| "jsonData": "{\"a\": [\"ArrayUnion\", 1, 2, 3]}", |
| "request": { |
| "database": "projects/projectID/databases/(default)", |
| "writes": [ |
| { |
| "transform": { |
| "document": "projects/projectID/databases/(default)/documents/C/d", |
| "fieldTransforms": [ |
| { |
| "fieldPath": "a", |
| "appendMissingElements": { |
| "values": [ |
| { |
| "integerValue": "1" |
| }, |
| { |
| "integerValue": "2" |
| }, |
| { |
| "integerValue": "3" |
| } |
| ] |
| } |
| } |
| ] |
| }, |
| "currentDocument": { |
| "exists": true |
| } |
| } |
| ] |
| } |
| } |
| } |
| ] |
| } |