couchbase / couchbase-python-client

Couchbase Python Client Library (Official)
https://www.couchbase.com/
Apache License 2.0
243 stars 110 forks source link

Please verify multi-level key support in the python interface #6

Closed natbusa closed 12 years ago

natbusa commented 12 years ago

...paces after each level.

This solves the bug of not being able to retrieve multi-valued keys as in the snippet below. bucket.view('_design/packets/_view/all', key=[u'05B3DCE1C2E21400', 0, 65537, 8916], limit=10)

By applying this change the produced string for the rest interface is: '["05B3DCE1C2E21400",0,65537,8916]' instead of the incorrect '["05B3DCE1C2E21400", 0, 65537, 8916]'

In fact, I don't see the reason why the latter should be giving troubles. It all points to a possibly incorrect url-encoding of the produced string.

Anyways, removing the spaces solves the problem

natbusa commented 12 years ago

after more testing it seems that I always have to pass the correct (no spaces) string.

The following seems to work: bucket.view('_design/packets/_view/all', key='["05B3DCE1C2E21400",0,65537,8916]', limit=10)

Is this the way it is supposed to be addressed?