CockroachDB cluster and database statistics for Ecto apps.
Mimics the API of ecto_psql_extras, but
targets CockroachDB's own introspection surface (SHOW JOBS, SHOW CHANGEFEED JOBS,
SHOW STATISTICS, SHOW CLUSTER SETTINGS, crdb_internal.*) instead of PostgreSQL
catalogs/extensions that CockroachDB doesn't support.
Usage
EctoCockroachExtras.jobs(MyApp.Repo)
EctoCockroachExtras.table_statistics(MyApp.Repo, "users")
EctoCockroachExtras.query(:cluster_settings, MyApp.Repo, format: :raw)
Summary
Functions
Run a healthcheck report combining several of the above checks.
Returns all available queries and their implementing modules.
Runs the query named name on repo, in the given format.
Types
@type repo() :: module()
Callbacks
Functions
Run a healthcheck report combining several of the above checks.
Accepts opts[:tables] (a list of table name strings) to enable the "stale table
statistics" check; without it, that check is reported as skipped.
Returns all available queries and their implementing modules.
The repo argument is accepted for API parity with ecto_psql_extras and reserved for
future CockroachDB-version-conditional query selection; it is currently unused.
Runs the query named name on repo, in the given format.
Options
:format-:ascii(default) prints a formatted table and returns:ok,:rawreturns the underlying%Postgrex.Result{}.:args- overrides the query module'sdefault_args.:query_opts- overrides the default Ecto query options ([log: false, timeout: 30000]).