couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2523) CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying /_all_docs should be invalid
Date Thu, 29 Jan 2015 18:05:34 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14297254#comment-14297254
] 

ASF GitHub Bot commented on COUCHDB-2523:
-----------------------------------------

GitHub user willholley opened a pull request:

    https://github.com/apache/couchdb-chttpd/pull/20

    Set view type before validating _all_docs parameters

    Matching couch_mrview, set view_type to "map" before validating query parameters for _all_docs.
This fixes a bug whereby validation fails
    when specifying _all_docs?conflicts=true. I missed this in the previous fix for COUCHDB-2523.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/willholley/couchdb-chttpd 2523-all-docs-validation-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-chttpd/pull/20.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20
    
----
commit a45b83160ba184573c7e21e175652395292db9da
Author: Will Holley <willholley@gmail.com>
Date:   2015-01-29T17:59:39Z

    Set view type before validating _all_docs parameters.
    
    Matching couch_mrview, set view_type to "map" before validating query
    parameters for _all_docs. This fixes a bug whereby validation fails
    when specifying _all_docs?conflicts=true.
    
    COUCHDB-2523

----


> CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying
/_all_docs should be invalid
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-2523
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2523
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Will Holley
>
> CouchDB 1.X validates that the combination of query parameters to _all_docs is valid.
For instance, you cannot specify keys and also startkey/endkey:
> {code}
> curl -g -XGET 'http://127.0.0.1:5984/testdb/_all_docs?keys=["a"]&startkey="a"' 
> {"error":"query_parse_error","reason":"`keys` is incompatible with `key`, `start_key`
and `end_key`"}
> {code}
> In CouchDB 2.0, there is no such validation:
> {code}
> curl -g -XGET 'http://127.0.0.1:15984/testdb/_all_docs?keys=["a"]&startkey="a"'
> {"total_rows":5,"rows":[
> {"id":"a","key":"a","value":{"rev":"1-4c6114c65e295552ab1019e2b046b10e"}}
> ]}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message