blob: 42f2b14f1c7f4f149d8df12702be251b9bd601e0 [file] [log] [blame]
{
"tests": [
{
"description": "set: ServerTimestamp with data",
"comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.",
"set": {
"docRefPath": "projects/projectID/databases/(default)/documents/C/d",
"jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}",
"request": {
"database": "projects/projectID/databases/(default)",
"writes": [
{
"update": {
"name": "projects/projectID/databases/(default)/documents/C/d",
"fields": {
"a": {
"integerValue": "1"
}
}
}
},
{
"transform": {
"document": "projects/projectID/databases/(default)/documents/C/d",
"fieldTransforms": [
{
"fieldPath": "b",
"setToServerValue": "REQUEST_TIME"
}
]
}
}
]
}
}
}
]
}