anchor.diff:  
   %% @private
   
  -do_count(Args, Url, IbrowseOpts) ->
  -    Result = case Args#view_query_args.method of
  -        get ->
  -            couchbeam_httpc:request(get, Url, ["200"], IbrowseOpts);
  -        post ->
  -            Body = ejson:encode({[{<<"keys">>, Args#view_query_args.keys}]}),
  -            Headers = [{"Content-Type", "application/json"}],
  -            couchbeam_httpc:request_stream(post, Url, ["200"],
  -                IbrowseOpts, Headers, Body)
  -    end,
  -    case Result of
  -        {ok, _, _, RespBody} ->
  -            {Props} = ejson:decode(RespBody),
  -            case proplists:get_value("limit",
  -                    Args#view_query_args.options, 0) of
  -            0 ->
  -                proplists:get_value(<<"total_rows">>, Props);
  -            _ ->
  -                Rows = proplists:get_value(<<"rows">>, Props),
  -                length(Rows)
  -            end;
  -        Error ->
  -            Error
  -    end.
  -
  +make_view(#db{server=Server}=Db, ViewName, Options, Fun) ->
  +    case parse_view_options(Options) of
  +        {error, _} = Error ->
  +            Error;
  +        Args ->
  +            case ViewName of
  +                'all_docs' ->
  +                    Url = couchbeam:make_url(Server, [couchbeam:db_url(Db), 
  +                            "/_all_docs"],
  +                            Args#view_query_args.options),
  +                    Fun(Args, Url);
  +                {DName, VName} ->
  +                    Url = couchbeam:make_url(Server, [couchbeam:db_url(Db), 
  +                            "/_design/", DName, "/_view/", VName],
  +                            Args#view_query_args.options),
  +                    Fun(Args, Url);
  +                _ ->
  +                    {error, invalid_view_name}
  +            end
  +    end.
  +    
   collect_view_first(Ref, Pid) ->
       receive
           {row, Ref, done} ->
  
positive.code:             Error
      end.
  
  -spec parse_view_options(Options::list()) -> view_query_args().
  %% @doc parse view options
  parse_view_options(Options) ->
  
negative.code:          count/1, count/2, count/3,
           first/1, first/2, first/3,
           all/1, all/2,
           fold/4, fold/5,
           view_loop/2, parse_view_options/1]).
  
  -spec all(Db::db()) -> {ok, Rows::list(ejson_object())} | {error, term()}.
  