EctoHooks.Delta (ecto_hooks v1.0.2) View Source
Defines the struct which is given as the 2nd argument to any after_* hooks.
Contains metadata which may be useful for introspecting or otherwise conditionally running hooks only when certain conditions are met.
The following information is present in an EctoHooks.Delta:
- The
Ecto.Repocallback that triggered the hook - The name of the current hook (useful if delegating to private functions in your schema)
- The
Ecto.Queryablepassed into the triggeringEcto.Repocallback if any - The
Ecto.Changesetpassed into the triggeringEcto.Repocallback if any
Link to this section Summary
Link to this section Types
Specs
hook() :: :after_update | :after_insert | :after_get | :after_delete | :before_update | :before_insert | :before_delete
Specs
repo_callback() :: :update! | :update | :one! | :one | :insert_or_update! | :insert_or_update | :insert! | :insert | :get_by! | :get_by | :get! | :get | :delete! | :delete | :all
Specs
Link to this section Functions
Specs
new!(repo_callback(), hook(), source :: any()) :: t() | no_return()