anchor.diff:          _ ->
               {Ctx, atom_to_binary(Model, utf8)}
       end.
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% Sets expiry field in context.
  +%% Couchbase treats numbers smaller or equal to 2592000 as document's time to live
  +%% and greater values as timestamp of deletion
  +%% Translate expiry time to couchbase format
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec set_expiry(ctx(), non_neg_integer()) -> ctx().
  +set_expiry(Ctx, Expiry) ->
  +    couchbase_driver:set_expiry(Ctx, Expiry).
   
   %%%===================================================================
   %%% Internal functions
  
positive.code:         #{expiry := _} ->
              Ctx;
          #{sync_enabled := true} ->
              couchbase_driver:set_expiry(Ctx, application:get_env(?CLUSTER_WORKER_APP_NAME, document_expiry, ?EXPIRY));
          _ ->
              couchbase_driver:set_expiry(Ctx, 1)
      end,
      Result = datastore_apply(CtxWithExpiry, Key, fun datastore:delete/3, delete, [Pred]),
      delete_all_links(Ctx, Key, Result),
  
negative.code: -export([fold_links/6]).
  -export([get_links_trees/2]).
  -export([fold_memory_keys/2]).
  -export([set_expiry/2]).
  %% for rpc
  -export([datastore_apply_all_subtrees/4]).
  
  