Hello,
I’m using get_multi of the python SDK to query a bunch of IDs from a bucket that is used by sync gateway. Now I’d like to access the revision of these documents but unfortunately get_multi doesn’t return it. Is there any to include xattrs (i.e. _sync.rev) in the response of get_multi?
@foobar123 which SDK Version are you using ?
I’m using version couchbase==3.0.7 python package and 3.0.6-1 of the apt packages libcouchbase-dev and libcouchbase3. Couchbase server is at 6.5.1 build 6299
Thanks @foobar123, @davidkelly can you please assist ?
Hi @foobar123 - get_multi
doesn’t have any way to specify the xattrs. And, there isn’t a lookup_in_multi
or similar. However, you can get the sync gateway rev in N1QL though. I believe something like SELECT META().id, META()._sync .rev from 'bucket' USE KEYS ["foo", "bar"];
. That will give you a rows object with a rev and id.
@davidkelly ok, thank you, I’ll use N1QL then