Tane

This module provides some functions to insert seeds.

import Tane

init
|> repo(MyApp.Repo)
|> model(MyApp.User)
|> seed(name: "Bob",  email: "bob@black.com")
|> seed(name: "Mary", email: "mary@blue.com")

Summary

delete_all!(tane)

Delete all entries stored in the repository. Internally invokes repo.delete_all(model)

init()
model(tane, model_module)
repo(tane, repo_module)
seed(tane, row)

Types

t :: %Tane{model: term, repo: term}

Functions

delete_all!(tane)

Specs:

  • delete_all!(t) :: t | no_return

Delete all entries stored in the repository. Internally invokes repo.delete_all(model).

init()

Specs:

  • init :: t
model(tane, model_module)

Specs:

  • model(t, atom) :: t
repo(tane, repo_module)

Specs:

  • repo(t, atom) :: t
seed(tane, row)

Specs: