anchor.diff:  %% passing them in the `Args' parameter. The entire operation is
   %% executed within the scope of a new transaction.
   %%
  -%% @spec update(Db, Key, Fun, Args) -> {ok, Value} | {error, Error}
  +%% The 'Opts' parameter is used to pass flags to transaction/3.
  +%%
  +%% @spec update(Db, Key, Fun, Args, Opts) -> {ok, Value} | {error, Error}
   %% where
   %%    Db = integer()
   %%    Key = term()
   %%    Fun = function()
   %%    Args = any()
  -%%
  -%% @end
  -%%--------------------------------------------------------------------
  --spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun(), Args :: db_update_fun_args()) ->
  +%%    Opts = [atom()]
  +%%
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun(), Args :: db_update_fun_args(), Opts :: db_flags) ->
       {ok, db_value()} | db_error().
   
  -update(Db, Key, Fun, Args) ->
  +update(Db, Key, Fun, Args, Opts) ->
       F = fun() ->
               Value = case get_r(Db, Key, [rmw]) of
                           not_found -> not_found;
  
positive.code:             put_r(Db, Key, NewValue),
              NewValue
          end,
      transaction(F).
  
  
  %%--------------------------------------------------------------------
  
negative.code: %%    Key = term()
  %%    Fun = function()
  %%
  %% @equiv update(Db, Key, Fun, undefined, [])
  %% @see update/5
  %% @end
  %%--------------------------------------------------------------------
  -spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun()) ->
      {ok, db_value()} | db_error().
  
  update(Db, Key, Fun) ->
      update(Db, Key, Fun, undefined, []).
  
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Updates the value of a key by executing a fun.
  %%
  %% @spec update(Db, Key, Fun, Args) -> {ok, Value} | {error, Error}
  %% where
  %%    Db = integer()
  %%    Key = term()
  %%    Fun = function()
  %%    Args = any()
  %%
  %% @equiv update(Db, Key, Fun, undefined, [])
  %% @see update/5
  %% @end
  %%--------------------------------------------------------------------
  -spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun(), Args :: db_update_fun_args()) ->
      {ok, db_value()} | db_error().
  
  update(Db, Key, Fun, Args) ->
      update(Db, Key, Fun, Args, []).
  
  
  %%--------------------------------------------------------------------
  