-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array as QueryParameters.Key value #2
Comments
Are you using the latest version of the couchdb package? I have some tests where an array is used as params := QueryParameters{
StartKey: pointer.String(fmt.Sprintf("[%q,%d]", "foo2", 20)),
EndKey: pointer.String(fmt.Sprintf("[%q,%d]", "foo2", 20)),
} The same should work for the |
OK, using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a design document with map function that use array as key for easy grouping. When queried directly, e.g. in browser / through curl, it works correctly, e.g.:
curl http:https://localhost:5984/db/_design/doc/_view/func?key=["a",1]
However, querying from this library, using
View.Get
doesn't work. This is due toQueryParameters
(and therefore itsKey
member) being URL encoded so if I do:It will instead query for
http:https://localhost:5984/db/_design/doc/_view/func?key=%5B%22a%22%2C1%5D
which CouchDB doesn't consider as array value.
Is there any way to overcome this?
The text was updated successfully, but these errors were encountered: