anchor.diff:  -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_txn_fun() :: fun(() -> term()).
  +-type db_txn_retries() :: infinity | non_neg_integer().
  +-type db_txn_error() :: {error, db_error_reason() | {transaction_failed, _}}.
   
   -type db_update_fun() :: fun((db_key(), db_value(), any()) -> db_value()).
   -type db_update_fun_args() :: undefined | [term()].
  
positive.code: %%
  %% @end
  %%--------------------------------------------------------------------
  -spec transaction(Fun :: txn_fun(), Retries :: txn_retries(), Opts :: db_flags()) ->
      {ok, db_value()} | {error, db_error_reason() | {transaction_failed, term()}}.
  
  transaction(_Fun, 0, _Opts) ->
      ok = txn_abort(),
  
negative.code: %%
  %% @end
  %%--------------------------------------------------------------------
  -spec update(Db :: db(), Key :: db_key(), Fun :: db_update_fun(), Args :: db_update_fun_args(), Opts :: db_flags()) ->
      {ok, db_value()} | db_txn_error().
  
  update(Db, Key, Fun, Args, Opts) ->
      F = fun() ->
  