anchor.diff:  %%  call to with_db will supply your M:F with a #db{} and then remaining args
   
   all_docs(DbName, #view_query_args{keys=nil} = QueryArgs) ->
  -    {ok, Db} = couch_db:open_int(DbName, []),
  +    {ok, Db} = get_or_create_db(DbName, []),
       #view_query_args{
           start_key = StartKey,
           start_docid = StartDocId,
  
positive.code: 
  with_db(DbName, Options, {M,F,A}) ->
      set_io_priority(DbName, Options),
      case couch_db:open_int(DbName, Options) of
      {ok, Db} ->
          rexi:reply(try
              apply(M, F, [Db | A])
  
negative.code: changes(DbName, Args, StartSeq) ->
      erlang:put(io_priority, {interactive, DbName}),
      #changes_args{style=Style, dir=Dir} = Args,
      case get_or_create_db(DbName, []) of
      {ok, Db} ->
          Enum = fun changes_enumerator/2,
          Opts = [{dir,Dir}],
  