Hi.
In an authorization handler I need to query a view (map only) with a single key.
The map function emits (openid, username) and there is no reduce.
I thounk I have to complete the snippet below with couch_view:fold but
can't figure out how to generate
a valid fold function, let alone one that filters on a given key.
find_user_with_openid(Db, OpenId) ->
DesignId = <<"_design/_openid">>,
ViewName = <<"users_by_openids">>
Stale = nil,
{ok, View, Group} = couch_view:get_map_view(Db, DesignId, ViewName,
nil),
Thanks.
--
:Matteo Caprari
[email protected]