benoitc / couchbeam

Apache CouchDB client in Erlang
Other
242 stars 113 forks source link

Feature request - use a parametrized module to represent a view result #9

Closed benbro closed 14 years ago

benbro commented 14 years ago

Hi,

Is it possible to use a parametrized module like mochiweb does for a request? Extracting info from the view result can be much more intuitive: view_res:get(total_rows) view_res:get(offset) view_res:get_doc_num(3) will give you back the third doc in the result. view_res:get_doc_prop(3, <<"name">>) will give you back the name field of the third doc.

What do you think?

benoitc commented 14 years ago

I'm not sure It can do it easyly actually. Also what is the point against using ViewPid ?

benoitc commented 14 years ago

after thinking about it , I don't think it's a good option for the current code. It's really better to use direct call to the api which already provides that.