DoubleEntryLedger.RepoBehaviour behaviour (double_entry_ledger v0.2.0)
View SourceDefines the behaviour for the DoubleEntryLedger Repo. This module should be used in the test environment to ensure that the Repo module implements the required functions.
Summary
Callbacks
@callback insert(struct_or_changeset :: Ecto.Schema.t() | Ecto.Changeset.t()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
@callback insert!(struct_or_changeset :: Ecto.Changeset.t()) :: Ecto.Schema.t()
@callback update(struct_or_changeset :: Ecto.Schema.t() | Ecto.Changeset.t()) :: {:ok, Ecto.Schema.t()} | {:error, Ecto.Changeset.t()}
@callback update!(struct_or_changeset :: Ecto.Changeset.t()) :: Ecto.Schema.t()