Description
Request
Modify the API or documentation for Touch function to don't ask for document's CAS parameter, touch doesn't amend document value.
https://godoc.org/github.com/couchbase/gocb#Bucket.Touch
Background
The following snippet was accepted when working with to 4.6 version:
```
fragment, mErr := bucket.MutateIn("1", 0, 0).Upsert("name", "New Test", false).Execute()
if mErr != nil {
logrus.Error("Mutate " + mErr.Error())
}
_, tErr := bucket.Touch("1", gocb.Cas(fragment.Cas()), uint32(20))
```
Problem
When you execute the same code on 5.x server an invalid error parameter is raised, the workaround is to fix the CAS value to 0:
```
_, tErr := bucket.Touch("1", gocb.Cas(0), uint32(20))
```
Attachments
Issue Links
For Gerrit Dashboard: GOCBC-317 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
95806,6 | GOCBC-317 Always pass CAS value of 0 from TouchEx | v7 | gocbcore | Status: MERGED | +2 | +1 |
95807,7 | GOCBC-317 Don't pass CAS value to TouchEx | master | gocb | Status: MERGED | +2 | +1 |