incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@buyways.nl>
Subject RE: Re: changes to list function's req.query in CouchDB 1.0.0
Date Thu, 15 Jul 2010 17:01:23 GMT
It should also be mentioned on the downloads page. Older versions also link to `backward incompatible
changes`.  
 
-----Original message-----
From: J Chris Anderson <jchris@gmail.com>
Sent: Thu 15-07-2010 17:57
To: user@couchdb.apache.org; 
Subject: Re: changes to list function's req.query in CouchDB 1.0.0


On Jul 15, 2010, at 3:29 AM, Bob Clary wrote:

> Previously in CouchDB 0.11 calling a list function with query strings passed the query
strings as properties of the req.query object with the property name being the query string
parameter name and the value being a string containing the query string parameter value.
> 
> For example:
> 
> ?include_docs=true&startkey={"foo":"bar"}&filter={"before":"2010-07-14T"}
> 
> would give:
> 
> req.query =
> {
>    include_docs: 'true',
>    startkey: '{"foo":"bar"}',
>    filter:   '{"before":"2010-07-14T"}'
> }
> 
> while:
> 
> ?include_docs=true&startkey=["foo","bar"]&filter={"before":"2010-07-14T"}
> 
> would give:
> 
> 
> req.query =
> {
>    include_docs: 'true',
>    startkey: '["foo", "bar"]',
>    filter:   '{"before":"2010-07-14T"}'
> }
> 
> Now in CouchDB 1.0.0 the I get the JSON.parse'd values of the startkey, endkey, and key.
> 
> For example
> 
> ?include_docs=true&startkey={"foo":"bar"}&filter={"after":"2010-07-14T"}
> 
> gives
> 
> req.query =
> {
>    include_docs: 'true',
>    startkey: {"foo":"bar"},
>    filter:   '{"after":"2010-07-14T"}'
> }
> 
> while
> 
> ?include_docs=true&startkey=["foo","bar"]&filter={"after":"2010-07-14T"}
> 
> gives
> 
> req.query =
> {
>    include_docs: 'true',
>    startkey: ["foo", "bar"],
>    filter:   '{"after":"2010-07-14T"}'
> }
> 
> I couldn't find any documentation about the change. Is this intended and will it continue
to be the case going forward?

Yes, this will continue going forward -- do you mind adding it to the Breaking_changes page
on the wiki?

Thanks

Chris



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message