anchor.diff:      wait_db_updated/3,
       get_rest_db_updated/1,
       configure_filter/4,
  -    filter/3
  +    filter/3,
  +    handle_db_event/3
   ]).
   
   -export([changes_enumerator/2]).
  
positive.code:     true ->
          fun(CallbackAcc) ->
              {Callback, UserAcc} = get_callback_acc(CallbackAcc),
              Self = self(),
              {ok, Notify} = couch_db_update_notifier:start_link(
                  fun({updated, DbName}) when Db0#db.name == DbName ->
                      Self ! db_updated;
                  (_) ->
                      ok
                  end
              ),
              {Db, StartSeq} = Start(),
              UserAcc2 = start_sending_changes(Callback, UserAcc, Feed),
  
negative.code:             end_sending_changes(Callback, UserAcc3, LastSeq, Feed)
          end
      end.
  
  
  handle_db_event(_DbName, updated, Parent) ->
      Parent ! db_updated,
      {ok, Parent};
  
  handle_db_event(_DbName, _Event, Parent) ->
      {ok, Parent}.
  
  
  get_callback_acc({Callback, _UserAcc} = Pair) when is_function(Callback, 3) ->
      Pair;
  