couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Kögl <koeglste...@gmail.com>
Subject Re: querying inside a view function
Date Tue, 17 May 2011 08:50:34 GMT
Hi,

Am 2011-05-16 22:43, schrieb Fabio Batalha Cunha dos Santos:
> In a view function, I would to query the database to get a specific
> info that are stored in another document in the same database.

No, that's not possible. A view function's result should only depend on
the document for which it is called, not on any other states (such as
the database). Otherwise this would yield different results without
changes to the document - these changes could then not be detected
because the view function is only evaluated when a document is
changed/replicated.

I am not quite sure what you are trying to accomplish, but maybe you can
move the logic you want to implement to the application instead?


-- Stefan

Mime
View raw message