I am using latest sdk and I can’t find any documentation about document metadatas. Can you help ?
How to get cas ? What I get is CouchbaseCas<7062207165670359040> an opaque and obscure structure
Where is the meta.rev attribute ?
What version of Couchbase Server are you using?
Now we are using 3.x but we may switch to 4.x soon, so both
With 4.x you can leverage the power of N1QL to get meta information about your documents. For example, you can run the following:
SELECT META(mybucket) FROM
That will return the following results:
Based on that information you can narrow your query like so:
SELECT META(mybucket).cas FROM `bucket-name-here` mybucket;
That would return only the CAS information about a document.
Otherwise, when you get documents from a lookup or ViewQuery you should be able to do
result.cas where result is the particular document returned.
Let me know if this helps.