incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcello Nuccio <marcello.nuc...@gmail.com>
Subject Re: querying inside a view function
Date Tue, 17 May 2011 21:16:31 GMT
List functions have access to multiple documents.

http://guide.couchdb.org/draft/transforming.html
http://wiki.apache.org/couchdb/Formatting_with_Show_and_List

hope it helps,
  Marcello

2011/5/17 Fabio Batalha Cunha dos Santos <fabio.batalha@scielo.org>:
> Hi,
>
> As I thought!
>
> We have this accomplished in application level.
>
> The problem is that we use couchdb as a webservices label for some apps and
> we intend to supply the data in a more accurated level.
>
> We will try to make changes in the data model, including some journal data
> in the article data.
>
> Thanks.
> *Fabio Batalha C. Santos*
> Colegiado SciELO
> www.scielo.org
> FAPESP - CNPq - BIREME - FapUNIFESP
>
>
>
> On Tue, May 17, 2011 at 5:50 AM, Stefan Kögl <koeglstefan@gmail.com> wrote:
>
>> 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