blob: 2c9a24da4f3fd50feabdb83049108aef3d8a7873 [file] [log] [blame] [edit]
{
"tests": [
{
"description": "update: ArrayRemove with data",
"comment": "A key with ArrayRemove is removed from the fields in the update \noperation. Instead it appears in update transforms.",
"update": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3]}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
},
"updateMask": {
"fieldPaths": [
"a"
]
},
"updateTransforms": [
{
"fieldPath": "b",
"removeAllFromArray": {
"values": [
{
"integerValue": "1"
},
{
"integerValue": "2"
},
{
"integerValue": "3"
}
]
}
}
],
"currentDocument": {
"exists": true
}
}
]
}
}
}
]
}