anchor.diff:    server_info/0,
     create_db/1,
     save/2,
  +  save/3,
     get/2,
     get/3,
     all/1,
  
positive.code:   stream/3,
    attach/4,
    fetch_attachment/3,
    drop_attachment/3]).
  
  %% gen_server callbacks
  -export([init/1,
  
negative.code: -spec(save(DBName :: term(), Doc :: term()) -> {ok, Doc :: term()}).
  save(DBName, Doc) -> gen_server:call(?MODULE, {save_doc, DBName, Doc}).
  
  save(DBName, Doc, RefRev) ->
    {DocKVList} = Doc,
    gen_server:call(?MODULE, {
      save_doc, DBName, {lists:concat([
        RefRev,
        DocKVList
      ])}}).
  
  -spec(get(DBName :: term(), Ref :: term()) -> {ok, Doc :: term()}).
  get(DBName, Ref) -> gen_server:call(?MODULE, {get_doc, DBName, Ref, []}).
  
  