Mix.Ecto
Conveniences for writing Ecto related Mix tasks.
Summary
Functions
- ensure_implements(module, behaviour, message)
Returns
true
if module implements behaviour.- ensure_repo(repo, args)
Ensures the given module is an Ecto.Repo.
- no_umbrella!(task)
Gets a path relative to the application path.
- open?(file)
Asks if the user wants to open a file based on ECTO_EDITOR.
- parse_repo(args)
Parses the repository option from the given command line args list.
Functions
ensure_implements(module, behaviour, message)
Returns true
if module implements behaviour.
ensure_repo(repo, args)
Specs
ensure_repo(module(), list()) :: Ecto.Repo.t()
Ensures the given module is an Ecto.Repo.
no_umbrella!(task)
Gets a path relative to the application path.
Raises on umbrella application.
open?(file)
Specs
open?(binary()) :: boolean()
Asks if the user wants to open a file based on ECTO_EDITOR.
parse_repo(args)
Specs
parse_repo([term()]) :: [Ecto.Repo.t()]
Parses the repository option from the given command line args list.
If no repo option is given, it is retrieved from the application environment.
© 2013 Plataformatec
© 2020 Dashbit
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Mix.Ecto.html