Updating Documents with CAS from N1QL

I am getting CAS from N1QL as a floating point number (ex: 1.438870608147579e+18) and Couchbase.Replace(,) expects a CAS value (ex: 0x7ebb481fb13). So the replace function is not working.

Also if I use the CAS from Couchbase.Get(), replace works. Can you please help.


Hi @Umeshav,
What SDK are you using and what version of CB Server?

Hi Martin,
Thanks for the quick reply.
I am using Python 2.0 SDK and CB4.
Also just to add on to the query, CAS obtained for N1QL query is different than one from Couchbase.get method.

From N1QL - 1.438870608147579e+18
From Get method - 0x5f8bb981fb13


Thanks for the update info. I will look in to it.

Hi @Umeshav,
I have looked in to this and found that this is probably related to this issue:

Please note that CB4 is still in beta and there are still things that need to be done before GA.

Thanks for your feedback and we are now tracking this issue.

here is the ticket and description for the issue,

You can subscribe to follow progress and get a notification when it’s fixed.

Thanks Martin, will follow the ticket