View Source EctoSQLite3Extras (ecto_sqlite3_extras v1.2.2)

Query stats about an SQLite database.

Summary

Types

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

Functions

Compile-time options used when building SQLite.

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.

Types

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

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

Functions

Link to this function

compile_options(repo, opts \\ [])

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

Compile-time options used when building SQLite.

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(query_name, repo, opts \\ [])

View Source
@spec query(atom(), 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.