The issue however is not with qs module, because this format is simply in url-encoded form and is valid for a lot of web servers. I believe the issue is with nano, since CouchDB seems to accept this kind of query string format for array key
If you want to reproduce this issue, simply use the db.view function with a key that is an array of keys, on a database that you know for sure this key returns some data.
If I'm totally wrong and just using nano the wrong way, please help me fetching data with an array of keys. Otherwise, I would be willing to help you fix this.
I am trying to use the following function
My key is an array of key. Exemple, in my view I have: key = [Montreal, Quebec, Canada], value = 1;
When I try this, I get no result:
After digging deep, I found that the module qs (
https://www.npmjs.com/package/qs
), which is a dependency of nano, format the query string like this:The issue however is not with qs module, because this format is simply in url-encoded form and is valid for a lot of web servers. I believe the issue is with nano, since CouchDB seems to accept this kind of query string format for array key
If you want to reproduce this issue, simply use the
db.view
function with a key that is an array of keys, on a database that you know for sure this key returns some data.If I'm totally wrong and just using nano the wrong way, please help me fetching data with an array of keys. Otherwise, I would be willing to help you fix this.
Thanks