Closed sendtopms closed 13 years ago
Yes just provide just provide keys as param. (sent from iphone)
Can you elaborate? Is it part of couchbeam_db open_doc?
No use views and pass keys as param.
Yea I figured out and thanks. I need to pass '_all_docs' as View Name. May be clear version (compare to one in Test case) for showing this example is here, Keys = [{"keys", [<<"item/2009/12/24/1261680528">>, <<"item/2009/12/24/1261680599">>]}], VResults5 = couchbeam_db:query_view(dbref, '_all_docs', Keys), VResults6 = couchbeam_view:fetch_view (VResults5),
Note: here dbref is the named reference to couchbeam process.
sorry was only on iphone yesterday. For all docs you can also use :
Pid =couchbeam_db:all_docs(dbref, Keys)
Results = couchbeam_view:fetch_view (Pid).
But right doc need to be improved. Thanks
Fixed in last head, couchbeam implements fold & foreach functions now. Ex:
Fun = fun(Row, AttIn) -> [Row|AttIn] end,
Att = couchbeam_view:fold(View, Fun),
Tid = ets:new(couchbeam_test, [set, private]),
Fun1 = fun({Row}) ->
Key = proplists:get_value(<<"key">>, Row),
true = ets:insert(Tid, {Key, Row})
end,
couchbeam_view:foreach(View, Fun1),
Thanks for the feedback :)
I am looking to use API which is described in the wiki http://wiki.apache.org/couchdb/HTTP_view_API under section "Querying Options" I want to use POST with keys "multiple keys" to retrive in single call. Is it available?