Trash.Repo.__using__
You're seeing just the macro
__using__
, go back to Trash.Repo module for more information.
Specs
Imports functions from Trash.Repo
.
It's not required to use
this module in order to use Trash
. Doing so
will import shorthand functions into your app's Repo
module with the repo
implicitly passed. It's a bit more convenient, but the functions are public
on Trash.Repo
, so if preferred they can be called directly.
# Shorthand with `use`
MyRepo.all_discarded(Post)
# Long form without
Trash.Repo.all_discarded(Post, [], MyRepo)
Options
repo
- A module reference to anEcto.Repo
; raisesArgumentError
if missing
Examples
defmodule MyApp.Repo
use Ecto.Schema
use Trash.Schema, repo: __MODULE__
end