nickva commented on issue #3977:
URL: https://github.com/apache/couchdb/issues/3977#issuecomment-1083260350
@ronag The precedence is in the order the parameters are specified. For
example:
```
http $DB/db/_all_docs'?endkey="b"&key="a"&key="c"'
```
Will set endkey to `b` then set both `startkey` and `endkey` to `a` then set
both `startkey` and `endkey` to `c` and will emit `c`:
```
{
"offset": 2,
"rows": [
{
"id": "c",
"key": "c",
"value": {
"rev": "1-935564bc7ec7e86aa82ecec3face18f6"
}
}
],
"total_rows": 3
}
```
I can't think of any useful cases for this, but it has been like that for
many years. It probably should be fixed to work like `keys=[...]` and raise a
`mutually_exclusive` 400 error or some `duplicate_parameter` error and such as
well.
I marked the issue as an enhancement. It could be picked up by a beginner
contributor as it doesn't seem particularly difficult to implement. But, it
might involve some discussion on the dev ML since it's a compatibility issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]