incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Clary <...@bclary.com>
Subject changes to list function's req.query in CouchDB 1.0.0
Date Thu, 15 Jul 2010 10:29:08 GMT
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?

bc

Mime
View raw message