Postgres database adapter entrypoint.
This adapter validates one Postgres repo per call:
Bylaw.Db.Adapters.Postgres.validate(
MyApp.Repo,
[
Bylaw.Db.Adapters.Postgres.Checks.MissingForeignKeyIndexes
]
)Pass :dynamic_repo when the call should run against one dynamic repo.
Validate multiple repos by calling validate/2 or validate/3 once per repo.
The repo argument expects an Ecto SQL repo at runtime. Bylaw keeps Ecto SQL as
an optional integration; callers must have ecto_sql and a Postgres driver in
their application when they use repo-backed targets.
Examples
Bylaw.Db.Adapters.Postgres.validate(
MyApp.Repo,
[
Bylaw.Db.Adapters.Postgres.Checks.MissingForeignKeyIndexes
]
)
Summary
Functions
Runs checks against one Postgres repo.
Runs checks against one Postgres repo with options.
Types
Option accepted by validate/3.
@type validate_opts() :: [validate_opt()]
Options accepted by validate/3.
Functions
@spec validate(repo :: module(), checks :: [Bylaw.Db.check_spec()]) :: Bylaw.Db.Check.result()
Runs checks against one Postgres repo.
Pass the repo and checks. Use :dynamic_repo when validating a specific
dynamic repo with validate/3. To validate multiple repos, call this function
once per repo.
@spec validate( repo :: module(), checks :: [Bylaw.Db.check_spec()], opts :: validate_opts() ) :: Bylaw.Db.Check.result()
Runs checks against one Postgres repo with options.
The only supported option is :dynamic_repo.