Skip to content

Instantly share code, notes, and snippets.

@thanos
Created September 23, 2010 21:41
Show Gist options
  • Select an option

  • Save thanos/594423 to your computer and use it in GitHub Desktop.

Select an option

Save thanos/594423 to your computer and use it in GitHub Desktop.
CouchDB: An erlang couchdb map function
% An a simple erlang couchdb view
%
% For the date see: https://gist.github.com/1125467
%
fun({Doc}) ->
case {proplists:get_value(<<"book">>, Doc)} of
{undefined} ->
ok;
{Name} ->
Emit(Name, {Doc})
end
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment