anchor.diff:              EAdd
       end.
   
  -delete(Collection, Metric, Bucket, Key) ->
  +delete(Collection, Metric, Bucket, Key) when is_binary(Metric) ->
  +    delete(Collection, dproto:metric_to_list(Metric), Bucket, Key);
  +delete(Collection, Metric, Bucket, Key) when is_binary(Key) ->
  +    delete(Collection, Metric, Bucket, dproto:metric_to_list(Key));
  +delete(Collection, Metric, Bucket, Key)
  +  when is_binary(Collection),
  +       is_list(Metric),
  +       is_binary(Bucket),
  +       is_list(Key) ->
       Q = "DELETE FROM " ?MET_TABLE " WHERE collection = $1 AND " ++
           "metric = $2 AND bucket = $3 AND key = $4",
       Vs = [Collection, Metric, Bucket, Key],
  
positive.code: add(Collection, Metric, Bucket, Key, []) ->
      add(Collection, Metric, Bucket, Key);
  
  add(Collection, Metric, Bucket, Key, NVs) ->
      case add(Collection, Metric, Bucket, Key) of
          ok ->
              ok;
  
negative.code:             EAdd
      end.
  
  update(Collection, Metric, Bucket, Key, NVs) when is_binary(Metric) ->
      update(Collection, dproto:metric_to_list(Metric), Bucket, Key, NVs);
  
  update(Collection, Metric, Bucket, Key, NVs) when is_binary(Key) ->
      update(Collection, Metric, Bucket, dproto:metric_to_list(Key), NVs);
  
  update(Collection, Metric, Bucket, Key, NVs)
    when is_binary(Collection),
         is_list(Metric),
         is_binary(Bucket),
         is_list(Key) ->
      AddRes = case add(Collection, Metric, Bucket, Key) of
                   ok ->
                       get_id(Collection, Metric, Bucket, Key);
  