Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

lightcouch: improve docs for View.query() #285

Closed
srl295 opened this issue Aug 22, 2016 · 2 comments
Closed

lightcouch: improve docs for View.query() #285

srl295 opened this issue Aug 22, 2016 · 2 comments
Labels

Comments

@srl295
Copy link
Contributor

srl295 commented Aug 22, 2016

FYI lightcouch/LightCouch#60

…when include_docs=false (as in a reduce), the Class classOfT is applied to the entire row {key: …, value: …}, not just the value. This probably should be documented.

@srl295 srl295 changed the title upstream: improve docs for View.query() lightcouch: improve docs for View.query() Aug 22, 2016
@ricellis
Copy link
Member

Thanks for the headsup @srl295 but we don't consume lightcouch from upstream and we've diverged quite a bit, we don't have a lightcouch style view query since 2.0.

The view code in java-cloudant 2.x is parameterized by <K> key and <V> value classes. So we always treat the values separately as type V.

We have a convenience method on a ViewRequest for retrieving a single reduce result:

Otherwise the ViewResponse has values and rows also typed by <V>, see:

If using include docs then the types of the row key and value are independent of the document type which is supplied as a class parameterized by <D> for example when calling:

@srl295
Copy link
Contributor Author

srl295 commented Aug 23, 2016

@ricellis got it… thanks. I did see the request/response but forgot to double check when fililng this. Need to get off 1.2.0…

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants