anchor.diff:  -spec delete(schema_name(), user_doc()) -> boolean().
   delete(DocName, Id) ->
     IdField = sumo_internal:id_field_name(DocName),
  +  sumo_event:dispatch(DocName, pre_deleted, [Id]),
     case delete_by(DocName, [{IdField, Id}]) of
       1 -> sumo_event:dispatch(DocName, deleted, [Id]), true;
       0 -> false
  
positive.code:     _         -> updated
    end,
    Store = sumo_config:get_store(DocName),
    case sumo_store:persist(Store, sumo_internal:new_doc(DocName, DocMap)) of
      {ok, NewDoc} ->
        Ret = sumo_internal:wakeup(NewDoc),
  
negative.code: -spec delete_by(schema_name(), conditions()) -> non_neg_integer().
  delete_by(DocName, Conditions) ->
    Store = sumo_config:get_store(DocName),
    sumo_event:dispatch(DocName, pre_deleted_total, [Conditions]),
    case sumo_store:delete_by(Store, DocName, Conditions) of
      {ok, 0} ->
        0;
      {ok, NumRows} ->
        sumo_event:dispatch(DocName, deleted_total, [NumRows, Conditions]),
        NumRows;
      Error ->
        throw(Error)
  