PgLargeObjects.Repo (PgLargeObjects v0.2.0)

View Source

Extension API for Ecto.Repo.

This exposes convenience APIs on an application's Ecto repository module such that explicitly passing the name of the repository to different APIs is no longer necessary.

The module is meant to be referenced via use, as in:

defmodule MyApp.Repo do
  use Ecto.Repo,
    otp_app: :my_app,
    adapter: Ecto.Adapters.Postgres

  use PgLargeObjects.Repo
end

Doing so causes the following convenience functions to be defined on the repository module:

Furthermore, a type t is defined in the current module. In case this is not desirable, e.g. because a type is already defined, pass the option omit_typespec: true.