View Source Lightning.Repo (Lightning v2.10.4)
Summary
Functions
Callback implementation for Ecto.Repo.aggregate/3
.
Callback implementation for Ecto.Repo.aggregate/4
.
Callback implementation for Ecto.Repo.all/2
.
Callback implementation for Ecto.Repo.checked_out?/0
.
Callback implementation for Ecto.Repo.checkout/2
.
Callback implementation for Ecto.Repo.config/0
.
Callback implementation for Ecto.Repo.default_options/1
.
Callback implementation for Ecto.Repo.delete/2
.
Callback implementation for Ecto.Repo.delete!/2
.
Callback implementation for Ecto.Repo.delete_all/2
.
A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval.
Callback implementation for Ecto.Repo.exists?/2
.
A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar depending on the adapter to obtain statistics for the given query.
Callback implementation for Ecto.Repo.get/3
.
Callback implementation for Ecto.Repo.get!/3
.
Callback implementation for Ecto.Repo.get_by/3
.
Callback implementation for Ecto.Repo.get_by!/3
.
Callback implementation for Ecto.Repo.get_dynamic_repo/0
.
Callback implementation for Ecto.Repo.in_transaction?/0
.
Callback implementation for Ecto.Repo.insert/2
.
Callback implementation for Ecto.Repo.insert!/2
.
Callback implementation for Ecto.Repo.insert_all/3
.
Callback implementation for Ecto.Repo.insert_or_update/2
.
Callback implementation for Ecto.Repo.insert_or_update!/2
.
Callback implementation for Ecto.Repo.load/2
.
Callback implementation for Ecto.Repo.one/2
.
Callback implementation for Ecto.Repo.one!/2
.
Callback implementation for Ecto.Repo.preload/3
.
Callback implementation for Ecto.Repo.prepare_query/3
.
Callback implementation for Ecto.Repo.put_dynamic_repo/1
.
A convenience function for SQL-based repositories that executes the given query.
A convenience function for SQL-based repositories that executes the given query.
A convenience function for SQL-based repositories that executes the given multi-result query.
A convenience function for SQL-based repositories that executes the given multi-result query.
Callback implementation for Ecto.Repo.reload/2
.
Callback implementation for Ecto.Repo.reload!/2
.
Callback implementation for Ecto.Repo.rollback/1
.
Callback implementation for Ecto.Repo.start_link/1
.
Callback implementation for Ecto.Repo.stop/1
.
Callback implementation for Ecto.Repo.stream/2
.
A convenience function for SQL-based repositories that translates the given query to SQL.
A small wrapper around Repo.transaction/2
.
Callback implementation for Ecto.Repo.transaction/2
.
Callback implementation for Ecto.Repo.update/2
.
Callback implementation for Ecto.Repo.update!/2
.
Callback implementation for Ecto.Repo.update_all/3
.
Functions
Callback implementation for Ecto.Repo.aggregate/3
.
Callback implementation for Ecto.Repo.aggregate/4
.
Callback implementation for Ecto.Repo.all/2
.
Callback implementation for Ecto.Repo.checked_out?/0
.
Callback implementation for Ecto.Repo.checkout/2
.
Callback implementation for Ecto.Repo.config/0
.
Callback implementation for Ecto.Repo.default_options/1
.
Callback implementation for Ecto.Repo.delete/2
.
Callback implementation for Ecto.Repo.delete!/2
.
Callback implementation for Ecto.Repo.delete_all/2
.
A convenience function for SQL-based repositories that forces all connections in the pool to disconnect within the given interval.
See Ecto.Adapters.SQL.disconnect_all/3
for more information.
Callback implementation for Ecto.Repo.exists?/2
.
A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar depending on the adapter to obtain statistics for the given query.
See Ecto.Adapters.SQL.explain/4
for more information.
Callback implementation for Ecto.Repo.get/3
.
Callback implementation for Ecto.Repo.get!/3
.
Callback implementation for Ecto.Repo.get_by/3
.
Callback implementation for Ecto.Repo.get_by!/3
.
Callback implementation for Ecto.Repo.get_dynamic_repo/0
.
Callback implementation for Ecto.Repo.in_transaction?/0
.
Callback implementation for Ecto.Repo.insert/2
.
Callback implementation for Ecto.Repo.insert!/2
.
Callback implementation for Ecto.Repo.insert_all/3
.
Callback implementation for Ecto.Repo.insert_or_update/2
.
Callback implementation for Ecto.Repo.insert_or_update!/2
.
Callback implementation for Ecto.Repo.load/2
.
Callback implementation for Ecto.Repo.one/2
.
Callback implementation for Ecto.Repo.one!/2
.
@spec paginate(any(), map() | Keyword.t()) :: Scrivener.Page.t()
Callback implementation for Ecto.Repo.preload/3
.
Callback implementation for Ecto.Repo.prepare_query/3
.
Callback implementation for Ecto.Repo.put_dynamic_repo/1
.
A convenience function for SQL-based repositories that executes the given query.
See Ecto.Adapters.SQL.query/4
for more information.
A convenience function for SQL-based repositories that executes the given query.
See Ecto.Adapters.SQL.query!/4
for more information.
A convenience function for SQL-based repositories that executes the given multi-result query.
See Ecto.Adapters.SQL.query_many/4
for more information.
A convenience function for SQL-based repositories that executes the given multi-result query.
See Ecto.Adapters.SQL.query_many!/4
for more information.
Callback implementation for Ecto.Repo.reload/2
.
Callback implementation for Ecto.Repo.reload!/2
.
Callback implementation for Ecto.Repo.rollback/1
.
@spec scrivener_defaults() :: Keyword.t()
Callback implementation for Ecto.Repo.start_link/1
.
Callback implementation for Ecto.Repo.stop/1
.
Callback implementation for Ecto.Repo.stream/2
.
A convenience function for SQL-based repositories that translates the given query to SQL.
See Ecto.Adapters.SQL.to_sql/3
for more information.
A small wrapper around Repo.transaction/2
.
Commits the transaction if the lambda returns :ok
or {:ok, result}
,
rolling it back if the lambda returns :error
or {:error, reason}
. In both
cases, the function returns the result of the lambda.
Example:
Repo.transact(fn ->
with {:ok, user} <- Accounts.create_user(params),
{:ok, _log} <- Logs.log_action(:user_registered, user),
{:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
{:ok, user}
end
end)
From blog post found here
Callback implementation for Ecto.Repo.transaction/2
.
Callback implementation for Ecto.Repo.update/2
.
Callback implementation for Ecto.Repo.update!/2
.
Callback implementation for Ecto.Repo.update_all/3
.