anchor.diff:  %%
   %% @end
   %%--------------------------------------------------------------------
  --spec transaction(Fun :: txn_fun(), Retries :: txn_retries(), Opts :: db_flags()) ->
  -    {ok, db_value()} | {error, db_error_reason() | {transaction_failed, term()}}.
  +-spec transaction(Fun :: db_txn_fun(), Retries :: db_txn_retries(), Opts :: db_flags()) ->
  +    {ok, db_value()} | db_txn_error().
   
   transaction(_Fun, 0, _Opts) ->
       ok = txn_abort(),
  
positive.code: -type db_error_reason() :: atom() | {unknown, integer()}.
  -type db_error() :: {error, db_error_reason()}.
  
  -type txn_fun() :: fun(() -> term()).
  -type txn_retries() :: infinity | non_neg_integer().
  
  -type db_update_fun() :: fun((db_key(), db_value(), any()) -> db_value()).
  -type db_update_fun_args() :: undefined | [term()].
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  -spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun()) ->
      {ok, db_value()} | db_txn_error().
  
  update(Db, Key, Fun) ->
      update(Db, Key, Fun, undefined, []).
  