incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: Views with parameters
Date Fri, 17 Jul 2009 15:48:05 GMT
On Wed, Jul 15, 2009 at 06:26:23PM +0200, Manuel de la Pena wrote:
> Is passing parameter in the view url work?

Consider a view as static: it is built from the state of all the documents
in your database, indexed for rapid querying by key.

When you query it, you can pass parameters like 'keys', 'startkey',
'endkey', 'limit' etc. to select the result set. But you can't supply
parameters for how the view was originally built on disk, because then the
view would have to be rebuilt every time.

The '_list' API *does* allow you to pass parameters to your list function;
it can perform post-processing of a view. Unfortunately it's not well
documented, but the javascript test code is pretty clear.



View raw message