View Source EctoSQLite3Extras (ecto_sqlite3_extras v1.1.6)

Query stats about an SQLite database.

Link to this section Summary

Types

Ecto repository module (or a pair of the module and the remote node).

Functions

Size of indices.

Run integrity checks on the database.

Values of all bool or integer PRAGMAs.

Get the map of all available queries.

Run the query specified by its slug atom and get (or print) the result.

Sequence numbers of autoincrement columns.

Size of tables (without indices).

Total size of all tables and indices.

Link to this section Types

@type repo() :: module() | {module(), node()}

Ecto repository module (or a pair of the module and the remote node).

Link to this section Functions

Link to this function

index_size(repo, opts \\ [])

View Source
@spec index_size(
  repo(),
  keyword()
) :: any()

Size of indices.

Link to this function

integrity_check(repo, opts \\ [])

View Source
@spec integrity_check(
  repo(),
  keyword()
) :: any()

Run integrity checks on the database.

Link to this function

pragma(repo, opts \\ [])

View Source
@spec pragma(
  repo(),
  keyword()
) :: any()

Values of all bool or integer PRAGMAs.

@spec queries(repo() | nil) :: %{required(atom()) => module()}

Get the map of all available queries.

Key: The friendly query name atom (the same as the function name).

Value: The name of the module defining the query behavior.

Link to this function

query(module_name, repo, opts \\ [])

View Source
@spec query(module(), repo(), keyword()) :: any()

Run the query specified by its slug atom and get (or print) the result.

Link to this function

sequence_number(repo, opts \\ [])

View Source
@spec sequence_number(
  repo(),
  keyword()
) :: any()

Sequence numbers of autoincrement columns.

The query will fail if there are no autoincrement columns in the DB yet.

Link to this function

table_size(repo, opts \\ [])

View Source
@spec table_size(
  repo(),
  keyword()
) :: any()

Size of tables (without indices).

Link to this function

total_size(repo, opts \\ [])

View Source
@spec total_size(
  repo(),
  keyword()
) :: any()

Total size of all tables and indices.