View Source Ash.Resource.ManualDestroy behaviour (ash v3.2.6)

A module to implement manual destroy actions.

Note that in the returns of these functions you must return the destroyed record or records.

Summary

Callbacks

Link to this callback

bulk_destroy(changesets, opts, context)

View Source (optional)
@callback bulk_destroy(
  changesets :: Enumerable.t(Ash.Changeset.t()),
  opts :: Keyword.t(),
  context :: Ash.Resource.ManualDestroy.Context.t()
) :: [
  ok: Ash.Resource.record(),
  error: Ash.Error.t(),
  notifications: [Ash.Notifier.Notification.t()]
]
Link to this callback

destroy(changeset, opts, context)

View Source
@callback destroy(
  changeset :: Ash.Changeset.t(),
  opts :: Keyword.t(),
  context :: Ash.Resource.ManualDestroy.Context.t()
) ::
  {:ok, Ash.Resource.record()}
  | {:ok, Ash.Resource.record(), [Ash.Notifier.Notification.t()]}
  | {:error, term()}