Trash.Repo.__using__

You're seeing just the macro __using__, go back to Trash.Repo module for more information.
Link to this macro

__using__(opts)

(macro)

Specs

__using__(opts :: list()) :: Macro.t()

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

Examples

defmodule MyApp.Repo
  use Ecto.Schema
  use Trash.Schema, repo: __MODULE__
end