anchor.diff:  %%--------------------------------------------------------------------
   %%% Internal functions
   %%--------------------------------------------------------------------
  -%%-------------------------------------------------------------------
  -%% @spec (Action::fun(), From::pid(), Args::list(), State) ->
  -%%     {ok, Value}
  -%% @doc The directory for the database
  -%% @end
  -%%-------------------------------------------------------------------
  -handle_queued_call(Action, From, Args,
  -                   #state{adapter = Adapter, queries = OldTransQ,
  -                          last_trans = LastTrans} = State) ->
  -  TransId = next_trans(LastTrans),
  -  try_to_call(TransId, Adapter, Action, Args),
  -  {noreply, State#state{queries = queue:in({TransId, From}, OldTransQ)}}.
  -% Super utility
  -try_to_call(TransId, M, F, A) ->
  -  From = self(),
  -  spawn(fun() ->
  -    case erlang:function_exported(M,F,erlang:length(A)) of
  -      true ->
  -        From ! {answer, TransId, apply(M,F,A)};
  -      false ->
  -        From ! {answer, TransId, not_found}
  -    end
  -  end).
   
  -% So that we can get a unique id for each communication
  -next_trans(I) when I < 268435455 -> I+1;
  -next_trans(_) -> 1.
  -
  -get_transaction(Q, I) -> get_transaction(Q, I, Q).
  -get_transaction(Q, I, OldQ) ->
  -  case queue:out(Q) of
  -    {{value, {I, From}}, Q2} ->
  -      {true, From, Q2};
  -    {empty, _} ->
  -      {false, OldQ};
  -    {_E, Q2} ->
  -      get_transaction(Q2, I, OldQ)
  -    end.
  +%% Super utility
  +try_to_call(F, A, State) ->
  +  M = State#state.adapter,
  +  case erlang:function_exported(M,F,erlang:length(A)) of
  +    true -> apply(M,F,A);
  +    false -> not_found
  +  end.
   
   init_adapter(Nodes, DbAdapter) ->
     case erlang:module_loaded(DbAdapter) of
  
positive.code: %%                                       {stop, Reason, State}
  %% Description: Handling all non call/cast messages
  %%--------------------------------------------------------------------
  handle_info({answer, TransId, Result}, #state{queries = Queries} = State) ->
    case get_transaction(Queries, TransId) of
      {true, From, Q} ->
        gen_server:reply(From, Result);
      {false, Q} ->
        ok
    end,
    {noreply, State#state{queries = Q}};
  
  handle_info(Info, State) ->
    erlang:display({?MODULE, handle_info, Info}),
  
negative.code: %% Description: Handling call messages
  %%--------------------------------------------------------------------
  handle_call({write, Table, Key, Proplist}, From, State) ->
    {reply, try_to_call(write, [Table, Key, Proplist], State), State};
  handle_call({save, Fun}, From, State) ->
    {reply, try_to_call(save, [Fun], State), State};
  handle_call({read, Table, Key}, From, State) ->
    {reply, try_to_call(read, [Table, Key], State), State};
  % Deletions
  handle_call({delete, Table, Key}, From, State) ->
    {reply, try_to_call(delete, [Table, Key], State), State};
  handle_call({delete_all, Table}, From, State) ->
    {reply, try_to_call(delete_all, [Table], State), State};
  handle_call({status}, From, State) ->
    {reply, try_to_call(status, [], State), State};
  handle_call({all, Table}, From, State) ->
    {reply, try_to_call(all, [Table], State), State};
  handle_call({run, Fun}, From, State) ->
    {reply, try_to_call(run, [Fun], State), State};
  handle_call({match, Mod}, From, State) ->
    {reply, try_to_call(match, [Mod], State), State};
  handle_call({info, Type}, From, State) ->
    {reply, try_to_call(info, [Type], State), State};
  handle_call(_Request, _From, State) ->
    Reply = ok,
    {reply, Reply, State}.
  