I have documents that would look like this:
{
"name": "n",
"age": 22
//other properties
"hash": "XyRZHDJJD6738..." //This property contains the hash of the object (calculated by the client)
}
From the client, I should whether:
Update the document using its key (known), ONLY if the hash is different (=> The stored object and the new object are not the same)
Insert the document if the Key doesn't exist
This operation is done in a bulk mode on a relatively large dataset, with concurrent access => So fetching the document then updating is not an option.
Is there a way to do this in Couchbase (5.1+)?