incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: Will include_docs still work when querying a list (couch 0.10.0)?
Date Tue, 20 Jul 2010 14:14:26 GMT
@Steven, what Mikeal is alluding to is that when querying a list/view
with include_docs=true, the object returned by getRow() will have a
"doc" property that contains the document for that row. It is then
your responsibility to use the document object, in your list function,
to return whatever data you want to be in the response.

On Mon, Jul 19, 2010 at 7:54 PM, Mikeal Rogers <mikeal.rogers@gmail.com> wrote:
> var row = getRow();
>
> row.doc is the document.
>
> Cheers,
>
> :)
>
> -Mikeal
>
> On Mon, Jul 19, 2010 at 5:39 PM, Steven Prentice <
> steven.prentice.87@gmail.com> wrote:
>
>> Can you please provide some explanation? because for me it is not working.
>> My view function outputs some JSON relating to the values in the view using
>> toJSON, when I request the list/view all I get is the JSON from the list
>> function and not the entire document(s)...regardless of include_docs being
>> true or false.
>>
>> On Mon, Jul 19, 2010 at 2:03 PM, Mikeal Rogers <mikeal.rogers@gmail.com
>> >wrote:
>>
>> > yes.
>> >
>> > On Sun, Jul 18, 2010 at 8:54 PM, Steven Prentice <
>> > steven.prentice.87@gmail.com> wrote:
>> >
>> > > Hi,
>> > > I am using a list function to filter a view, basically the list
>> function
>> > > takes some parameters, filters the view and sends back JSON using the
>> > > toJSON
>> > > function to my application. I am just wondering if I add include_docs
>> > that
>> > > I
>> > > am still able to retrieve the docs as well, now that I have a raw JSON
>> > > object being sent back?
>> > >
>> > > Cheers
>> > > Steve
>> > >
>> >
>>
>

Mime
View raw message