Helper functions used for handling manual actions when used in bulk operations.
Summary
Functions
Builds a BulkResult from processed results.
Processes the results of a manual action's bulk function.
Used when a manual action does not export a bulk version of the action.
Functions
@spec build_bulk_result( processed_results :: [Ash.Resource.record() | {:error, term()}], any_success? :: boolean(), notifications :: [Ash.Notifier.Notification.t()], opts :: Keyword.t() ) :: Ash.BulkResult.t()
Builds a BulkResult from processed results.
Takes a list of records and {:error, error} tuples (output from process_results),
along with success tracking and notifications, and builds the final BulkResult.
Processes the results of a manual action's bulk function.
Returns tagged tuples {:ok, result, changeset} or {:error, error, changeset}
that can be processed by process_results to run after_transaction hooks.
Used when a manual action does not export a bulk version of the action.
Returns a tagged tuple {:ok, result, changeset} or {:error, error, changeset}
that can be processed by process_results to run after_transaction hooks.