anchor.diff:    stream/3,
     attach/4,
     fetch_attachment/3,
  -  drop_attachment/3]).
  +  drop_attachment/3,
  +  stream_attach/2,
  +  stream_attach_done/1]).
   
   %% gen_server callbacks
   -export([init/1,
  
positive.code: -spec(save(DBName :: term(), Doc :: term()) -> {ok, Doc :: term()}).
  save(DBName, Doc) -> gen_server:call(?MODULE, {save_doc, DBName, Doc}).
  
  -spec(get(DBName :: term(), Ref :: term()) -> {ok, Doc :: term()}).
  get(DBName, Ref) -> gen_server:call(?MODULE, {get_doc, DBName, Ref, []}).
  
  
negative.code:     Opts :: term()) -> {ok, Result :: term()}).
  attach(DBName, Ref, {Name, Attachment}, Opts) ->
    gen_server:call(?MODULE, {attach_doc, DBName, Ref, {Name, Attachment}, Opts}).
  
  stream_attach(Ref, Msg) ->
    gen_server:call(?MODULE, {stream_attach, Ref, Msg}).
  
  stream_attach_done(Ref) ->
    gen_server:call(?MODULE, {stream_attach, Ref, eof}).
  
  -spec(fetch_attachment(DBName :: term(), Ref :: term(), Name :: term()) ->
    {ok, Attachment :: term()}).
  