anchor.diff:           handle_info/2]).
   -export([start_connection/0, start_connection/1, start_connection_link/0,
            start_connection_link/1]).
  --export([info/1, create_db/2, open_db/2, open_or_create_db/2, delete_db/2,
  -         all_dbs/1, is_db/2, close_db/2]).
  +-export([info/1, close/1, create_db/2, open_db/2, open_or_create_db/2, 
  +         delete_db/2, all_dbs/1, is_db/2, close_db/2]).
            
    
   start_connection() -> start_connection(#couchdb_params{}).
  
positive.code: start_connection_internal(#couchdb_params{prefix=Prefix,name=Name} = CouchdbParams,
                      ProcLink) ->
  
      Prefix1 = case Prefix of
          "" -> "/";
          _ -> Prefix
      end,
      CouchdbParams1 = CouchdbParams#couchdb_params{prefix=Prefix1},
      InitialState = #server_state{couchdb = CouchdbParams1,
                                   prefix  = Prefix1,
                                   name=Name},
      {ok, Pid} = start_internal(InitialState, ProcLink),
      {ok, _} = couchbeam_manager:register_connection(Name, Pid),
      Pid.
      
  start_internal(InitialState, _Link = true) ->
  
negative.code: start_internal(InitialState, _Link = false) ->
      gen_server:start(couchbeam_server, InitialState, []).
      
      
  close(ConnectionId) ->
      try
          gen_server:call(server_pid(ConnectionId), close)
      catch
          exit:_ -> ok
      end.
      
  info(ConnectionId) ->
      gen_server:call(server_pid(ConnectionId), info).
      
  %%---------------------------------------------------------------------------
  %% DB operations
  