Behaviour implemented by database validation checks.
A check receives one Bylaw.Db.Target.t/0 and any check-specific options.
Scope such as schemas, tables, or indexes belongs in the check options.
Summary
Callbacks
Validates one database target.
Types
Check-specific option.
@type check_opts() :: [check_opt()]
Check-specific options.
@type result() :: :ok | {:error, [Bylaw.Db.Issue.t()]}
The result returned by a database check.
Callbacks
@callback validate(target :: Bylaw.Db.Target.t(), opts :: check_opts()) :: result()
Validates one database target.
Return :ok when the target passes, or {:error, issues} with a non-empty
list of Bylaw.Db.Issue.t/0 values when it fails.