anchor.diff:  changes_enumerator(DocInfo, Acc) ->
       #changes_acc{
           filter = FilterFun, callback = Callback, prepend = Prepend,
  -        user_acc = UserAcc, limit = Limit, resp_type = ResponseType
  +        user_acc = UserAcc, limit = Limit, resp_type = ResponseType, db = Db
       } = Acc,
       #doc_info{high_seq = Seq} = DocInfo,
  -    Results0 = FilterFun(DocInfo),
  +    Results0 = FilterFun(Db, DocInfo),
       Results = [Result || Result <- Results0, Result /= null],
       Go = if (Limit =< 1) andalso Results =/= [] -> stop; true -> ok end,
       case Results of
  
positive.code:     case [list_to_binary(couch_httpd:unquote(Part))
              || Part <- string:tokens(FilterName, "/")] of
      [] ->
          fun(#doc_info{revs=Revs}) ->
                  builtin_results(Style, Revs)
          end;
      [DName, FName] ->
  
negative.code:                     [DocInfo#doc_info{revs=[Rev]}|| Rev <- DocInfo#doc_info.revs]
                  end,
                  Docs = [Doc || {ok, Doc} <- [
                          couch_db:open_doc(Db2, DocInfo2, [deleted, conflicts])
                              || DocInfo2 <- DocInfos]],
                  {ok, Passes} = couch_query_servers:filter_view(
                      DDoc, VName, Docs
                  ),
  