anchor.diff:  %% @doc Deletes the tuple saved under Key and returns the new DB.
   %%      If such a tuple does not exists nothing is changed.
   -spec delete(DB::db(), Key::key()) -> db().
  -delete({DB, _FileName} = State, Key) ->
  +delete({DB, _DBName} = State, Key) ->
       toke_drv:delete(DB, ?IN(Key)),
       State.
   
   %% @doc Returns the name of the DB specified in @see new/1.
   -spec get_name(DB::db()) -> nonempty_string().
  -get_name({_DB, FileName}) ->
  -    FileName.
  +get_name({_DB, DBName}) ->
  +    DBName.
   
   %% @doc Returns the current load (i.e. number of stored tuples) of the DB.
   -spec get_load(DB::db()) -> non_neg_integer().
  -get_load({DB, _FileName}) ->
  +get_load({DB, _DBName}) ->
       %% TODO: not really efficient (maybe store the load in the DB?)
       toke_drv:fold(fun (_K, _V, Load) -> Load + 1 end, 0, DB).
   
  
positive.code: %% @doc Creates new DB handle named DBName.
  -spec new(DBName::nonempty_string()) -> db().
  new(DBName) ->
      Dir = util:make_filename(atom_to_list(node())),
      FullDir = [config:read(db_directory), "/", Dir],
      _ = case file:make_dir(FullDir) of
          ok -> ok;
          {error, eexist} -> ok;
          {error, Error} -> erlang:exit({db_toke, 'cannot create dir', FullDir, Error})
      end,
      {_Now_Ms, _Now_s, Now_us} = Now = os:timestamp(),
      {{Year, Month, Day}, {Hour, Minute, Second}} =
          calendar:now_to_local_time(Now),
      FileBaseName = util:make_filename(
                       io_lib:format("db_~s_~B~B~B-~B~B~B\.~B.tch",
                                     [DBName, Year, Month, Day, Hour, Minute, Second, Now_us])),
      FullFileName = lists:flatten([FullDir, "/", FileBaseName]),
      new_db(FullFileName, [read, write, create, truncate]).
  
  %% @doc Open a previously existing database.
  -spec open(DBName::nonempty_string()) -> db().
  open(FileName) ->
      new_db(FileName, [read, write]).
  
  -spec new_db(FileName::string(),
               TokeOptions::[read | write | create | truncate | no_lock |
                             lock_no_block | sync_on_transaction]) -> db().
  new_db(FileName, TokeOptions) ->
      DB = case toke_drv:start_link() of
          {ok, Pid} -> Pid;
          ignore ->
  
negative.code: -export([foldl/3, foldl/4, foldl/5]).
  -export([foldr/3, foldr/4, foldr/5]).
  
  -type db() :: {DB::pid(), DBName::nonempty_string()}.
  -type key() :: db_backend_beh:key(). %% '$end_of_table' is not allowed as key() or else iterations won't work!
  -type entry() :: db_backend_beh:entry().
  
  