I’m trying to consistently get the revision property of a document on couchbase server as well as metadata.
I’m hoping to get this via the .Net SDK.
The implementation of n1ql and the .Net SDK and the admin interface seems to be confused with what should be returned as a document, especially with regards to what metadata is and should return as such.
It is returning a different set of metadata in all three cases
N1ql
select meta() from bucket
“cas”: 1512468490617487360,
“expiration”: 0,
“flags”: 0,
“id”: “21”,
“type”: “json”
.Net SDK (not even sure IF you can get the revision metadata from this)
bucket.Get(docId)
“id”:“21”,
“cas”:1512468490617487360,
“token”:“mt{bRef=, vbID= -1, vbUUID=-1, seqno=-1}”,
“content”:“{"_attachments":{"cat.jpg":{"content_type":"image/jpeg","digest":"sha1-oMWAKMWnfn36tgTepCyKfBvcVLA=","length":6546,"revpos":2,"stub":true}},"surveyid":"S3"}”
}
Couchbase Server Web Admin - Documents view
“id”: “21”,
“rev”: “7-14fd5e142d3a00000000000000000000”,
“expiration”: 0,
“flags”: 0
it is also visible via the Sync Gateway REST API and Web Admin interface, but I shouldn’t have to use this with shared bucket access ability available in couchbase, apart from the fact that the rev property is actually Couchbase Server metadata anyway and not Sync Gateway.
I appreciate any assistance or pointers