View Source Ash.Resource.ManualCreate behaviour (ash v3.4.43)

A module to implement manual create actions.

Summary

Callbacks

bulk_create(changesets, opts, context)

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

create(changeset, opts, context)

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