View Source Bonfire.Common.Repo.Delete (bonfire v0.3.5-classic-beta.10)

Link to this section Summary

Functions

Deletes an entry from the database, or throws an error

Actually deletes an entry from the database

Marks an entry as deleted in the database or throws an error

Just marks an entry as deleted in the database

Link to this section Functions

@spec hard_delete!(any()) :: any()

Deletes an entry from the database, or throws an error

@spec hard_delete(any()) :: {:ok, any()} | {:error, :deletion_error}

Actually deletes an entry from the database

Link to this function

maybe_allow_delete?(user, context)

View Source
@spec soft_delete!(any()) :: any()

Marks an entry as deleted in the database or throws an error

@spec soft_delete(any()) :: {:ok, any()} | {:error, :deletion_error}

Just marks an entry as deleted in the database

Link to this function

soft_delete_changeset(it, column \\ :deleted_at, value \\ DateTime.utc_now(), error \\ "was already deleted")

View Source

Creates a changeset for deleting an entity