View Source Ash.Resource.ManualUpdate behaviour (ash v3.4.49)

A module to implement manual update actions.

Summary

Callbacks

bulk_update(changesets, opts, context)

(optional)
@callback bulk_update(
  changesets :: Enumerable.t(Ash.Changeset.t()),
  opts :: Keyword.t(),
  context :: Ash.Resource.ManualUpdate.Context.t()
) :: [
  :ok
  | {:ok, Ash.Resource.record()}
  | {:error, Ash.Error.t()}
  | {:notifications, [Ash.Notifier.Notification.t()]}
]

update(changeset, opts, context)

@callback update(
  changeset :: Ash.Changeset.t(),
  opts :: Keyword.t(),
  context :: Ash.Resource.ManualUpdate.Context.t()
) ::
  {:ok, Ash.Resource.record()}
  | {:ok, Ash.Resource.record(),
     %{notifications: [Ash.Notifier.Notification.t()]}}
  | {:error, term()}