EctoMySQLExtras behaviour (Ecto MySQL Extras v0.3.0) View Source

Documentation for EctoMySQLExtras.

Link to this section Summary

Link to this section Types

Specs

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

Link to this section Callbacks

Specs

info() :: %{
  :title => String.t(),
  :columns => [%{name: atom(), type: atom()}],
  optional(:order_by) => [{atom(), :ASC | :DESC}],
  optional(:args) => [atom()],
  optional(:default_args) => list()
}

Link to this section Functions

Link to this function

db_settings(repo, opts \\ [])

View Source

Specs

db_settings(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

db_status(repo, opts \\ [])

View Source

Specs

db_status(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

index_size(repo, opts \\ [])

View Source

Specs

index_size(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

long_running_queries(repo, opts \\ [])

View Source

Specs

long_running_queries(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

plugins(repo, opts \\ [])

View Source

Specs

plugins(repo(), keyword()) :: :ok | MyXQL.Result.t()

Specs

queries(repo()) :: map()
Link to this function

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

View Source

Specs

query(atom(), repo(), keyword()) :: :ok | MyXQL.Result.t()

Run a query with name, on repo, in the given format. The repo can be a module name or a tuple like {module, node}.

Options

  • :format - The format that results will return. Accepts :ascii or :raw. If :ascii a nice table printed in ASCII - a string will be returned. Otherwise a result struct will be returned. This option is required.

  • :args - Overwrites the default arguments for the given query. You can check the defaults of each query in its modules defined in this project.

Link to this function

records_rank(repo, opts \\ [])

View Source

Specs

records_rank(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

table_indexes_size(repo, opts \\ [])

View Source

Specs

table_indexes_size(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

table_size(repo, opts \\ [])

View Source

Specs

table_size(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

total_index_size(repo, opts \\ [])

View Source

Specs

total_index_size(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

total_table_size(repo, opts \\ [])

View Source

Specs

total_table_size(repo(), keyword()) :: :ok | MyXQL.Result.t()
Link to this function

unused_indexes(repo, opts \\ [])

View Source

Specs

unused_indexes(repo(), keyword()) :: :ok | MyXQL.Result.t()