# `Bylaw.Db.Check`
[🔗](https://github.com/ryanzidago/bylaw/blob/v0.1.0-alpha.1/lib/bylaw/db/check.ex#L1)

Behaviour implemented by database validation checks.

A check receives one `t:Bylaw.Db.Target.t/0` and any check-specific options.
Scope such as schemas, tables, or indexes belongs in the check options.

# `check_opt`

```elixir
@type check_opt() :: {atom(), term()}
```

Check-specific option.

# `check_opts`

```elixir
@type check_opts() :: [check_opt()]
```

Check-specific options.

# `result`

```elixir
@type result() :: :ok | {:error, [Bylaw.Db.Issue.t()]}
```

The result returned by a database check.

# `validate`

```elixir
@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 `t:Bylaw.Db.Issue.t/0` values when it fails.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
