PgLargeObjects.Repo (PgLargeObjects v0.2.1)
View SourceExtension 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
endDoing so causes the following convenience functions to be defined on the repository module:
import_large_object(data, opts)- shortcut forPgLargeObjects.import/3.export_large_object(oid, opts)- shortcut forPgLargeObjects.export/3.create_large_object/1- shortcut forPgLargeObjects.LargeObject.create/2.open_large_object/1- shortcut forPgLargeObjects.LargeObject.open/3.remove_large_object/1- shortcut forPgLargeObjects.LargeObject.remove/2.
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.