Description
If I query my bucket with the key/value `get` API, I get a different CAS number than I I get in a N1QL query for the same document:
SELECT META().cas, * FROM `test_bucket` WHERE name = 'Fibonacci'; |
[
|
{
|
"cas": 1608614025244311552, |
"test_bucket": { |
"id": "de3f7b88-5d34-4bf1-bd57-532ea6b456d3", |
"luckyNumber": 11235, |
"name": "Fibonacci" |
}
|
}
|
]
|
vs:
cluster.bucket('test_bucket').default_collection.get('de3f7b88-5d34-4bf1-bd57-532ea6b456d3') |
|
#<Couchbase::Collection::GetResult:0x0000556c617e5838 @expiry=nil, @error=nil, @transcoder=#<Couchbase::JsonTranscoder:0x0000556c617e5950>, @cas=113129152401942, @flags=33554438, @encoded="{\"id\":\"de3f7b88-5d34-4bf1-bd57-532ea6b456d3\",\"name\":\"Fibonacci\",\"luckyNumber\":11235}"> |
CAS from n1ql: 1608614025244311552
CAS from `get`: 113129152401942
In the old SDK (2.0 from GitHub), we got the same CAS number regardless of whether we used n1ql or `get`.